From: Zdenek Kabelac Date: Fri, 8 Apr 2011 14:18:40 +0000 (+0000) Subject: Use dm_snprintf X-Git-Tag: v2_02_91~939 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=6b7fe2852aa2798facb968bc6e6e580238176ea8;p=lvm2.git Use dm_snprintf and fix differently signed comparation. --- diff --git a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c index 01ac65e06..2b0967038 100644 --- a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c +++ b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c @@ -125,8 +125,8 @@ static int _extend(const char *device) syslog(LOG_ERR, "Unable to determine VG name from %s.", device); return 0; } - if (sizeof(cmd_str) <= snprintf(cmd_str, sizeof(cmd_str), - "lvextend --use-policies %s/%s", vg, lv)) { + if (dm_snprintf(cmd_str, sizeof(cmd_str), + "lvextend --use-policies %s/%s", vg, lv) < 0) { syslog(LOG_ERR, "Unable to form LVM command: Device name too long."); return 0; }