Skip to contentSkip to conversation

LVM2/lib/log log.c

PATCH [email protected] 1 participant 1 message Oct 26, 2010

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2010-10-26 08:53:25

Modified files:
lib/log : log.c

Log message:
Remove bufused for calculation

As bufused is assigned 0 in preceding source line clang Idempotent operation

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/log/log.c.diff?cvsroot=lvm2&r1=1.59&r2=1.60

lib/log/log.c +1 -1
@@ -359,7 +359,7 @@
 		_already_logging = 1;
 		memset(&buf, ' ', sizeof(buf));
 		bufused = 0;
-		if ((n = dm_snprintf(buf, sizeof(buf) - bufused - 1,
+		if ((n = dm_snprintf(buf, sizeof(buf) - 1,
 				      "%s:%d %s%s", file, line, log_command_name(),
 				      _msg_prefix)) == -1)
 			goto done;