]> sourceware.org Git - lvm2.git/commitdiff
lvmetad: fix test for dm_asprintf
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 12 Oct 2012 09:34:15 +0000 (11:34 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 12 Oct 2012 09:36:01 +0000 (11:36 +0200)
libdaemon/client/config-util.c

index 8a6dced55c11561e87de40ac8396d0dba8391672..9b893c61c46e4ae8d993539efe470d9e9efb3444 100644 (file)
@@ -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 ||
This page took 0.033806 seconds and 5 git commands to generate.