diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2010-10-26 10:14:41 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2010-10-26 10:14:41 +0000 |
commit | 44110cd33ef64ef859f8e65032138fd1d511c6fc (patch) | |
tree | 7ebfe6c74753e0709a5c7e02a56f864fcdfed9f7 /daemons/cmirrord/functions.c | |
parent | d0604a856deb96f94203f05933f64ea00c0fae34 (diff) | |
download | lvm2-44110cd33ef64ef859f8e65032138fd1d511c6fc.tar.gz lvm2-44110cd33ef64ef859f8e65032138fd1d511c6fc.tar.xz lvm2-44110cd33ef64ef859f8e65032138fd1d511c6fc.zip |
Add missing return for NULL passed buffer
Function pull_stateo() checks for NULL 'buf' - but return for this error
path was missing. cmirror code never calls this function with NULL 'buf',
so this fix has no effect on current code base, but makes clang happier.
Diffstat (limited to 'daemons/cmirrord/functions.c')
-rw-r--r-- | daemons/cmirrord/functions.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c index e5da7575..58e76ac4 100644 --- a/daemons/cmirrord/functions.c +++ b/daemons/cmirrord/functions.c @@ -1809,8 +1809,10 @@ int pull_state(const char *uuid, uint64_t luid, int bitset_size; struct log_c *lc; - if (!buf) + if (!buf) { LOG_ERROR("pull_state: buf == NULL"); + return -EINVAL; + } lc = get_log(uuid, luid); if (!lc) { |