LVM2/daemons/cmirrord functions.c

[email protected] <[email protected]>
Newsgroups dev.linux.lists.lvm-devel
Message-ID <[email protected]>
CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac at sourceware.org	2010-10-26 10:14:41

Modified files:
	daemons/cmirrord: functions.c 

Log message:
	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.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/cmirrord/functions.c.diff?cvsroot=lvm2&r1=1.24&r2=1.25

--- LVM2/daemons/cmirrord/functions.c	2010/08/30 18:37:42	1.24
+++ LVM2/daemons/cmirrord/functions.c	2010/10/26 10:14:41	1.25
@@ -1809,8 +1809,10 @@
 	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) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.