]> sourceware.org Git - lvm2.git/commitdiff
Add missing return for NULL passed buffer
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 26 Oct 2010 10:14:41 +0000 (10:14 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 26 Oct 2010 10:14:41 +0000 (10:14 +0000)
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.

daemons/cmirrord/functions.c

index e5da75756a83bcc91dadc8879e9b54d02536f7a5..58e76ac492b68a38817d3de875791379cef9d369 100644 (file)
@@ -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) {
This page took 0.039065 seconds and 5 git commands to generate.