summaryrefslogtreecommitdiff
path: root/libdaemon
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-10-12 11:34:15 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2012-10-12 11:36:01 +0200
commit5a958655ddd63a7e9feeda444788313f9380aef1 (patch)
treef04f840589271c8610af5a936fbb523a0a37c471 /libdaemon
parentd6d207006a8f337e9d6919ffddedfa08dac128c6 (diff)
downloadlvm2-5a958655ddd63a7e9feeda444788313f9380aef1.tar.gz
lvmetad: fix test for dm_asprintf
Diffstat (limited to 'libdaemon')
-rw-r--r--libdaemon/client/config-util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libdaemon/client/config-util.c b/libdaemon/client/config-util.c
index 8a6dced55..9b893c61c 100644
--- a/libdaemon/client/config-util.c
+++ b/libdaemon/client/config-util.c
@@ -38,18 +38,18 @@ int buffer_append_vf(struct buffer *buf, va_list ap)
keylen = strchr(next, '=') - next;
if (strstr(next, "%d") || strstr(next, "%" PRId64)) {
value = va_arg(ap, int64_t);
- if (!dm_asprintf(&append, "%.*s= %" PRId64 "\n", keylen, next, value) < 0)
+ if (dm_asprintf(&append, "%.*s= %" PRId64 "\n", keylen, next, value) < 0)
goto fail;
} else if (strstr(next, "%s")) {
string = va_arg(ap, char *);
- if (!dm_asprintf(&append, "%.*s= \"%s\"\n", keylen, next, string) < 0)
+ if (dm_asprintf(&append, "%.*s= \"%s\"\n", keylen, next, string) < 0)
goto fail;
} else if (strstr(next, "%b")) {
if (!(block = va_arg(ap, char *)))
continue;
- if (!dm_asprintf(&append, "%.*s%s", keylen, next, block) < 0)
+ if (dm_asprintf(&append, "%.*s%s", keylen, next, block) < 0)
goto fail;
- } else if (!dm_asprintf(&append, "%s", next) < 0)
+ } else if (dm_asprintf(&append, "%s", next) < 0)
goto fail;
if (!append ||