From 44110cd33ef64ef859f8e65032138fd1d511c6fc Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 26 Oct 2010 10:14:41 +0000 Subject: [PATCH] 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. --- daemons/cmirrord/functions.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c index e5da75756..58e76ac49 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) {