]> sourceware.org Git - lvm2.git/commitdiff
cleanup: ignore errors
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 13 Dec 2012 18:55:33 +0000 (19:55 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Sat, 15 Dec 2012 13:57:40 +0000 (14:57 +0100)
Since we are doing just dump and function doesn't report
any error, explicitely ignore return values from
dm_config_write_node and dm_asprintf.

Same applies for the logging function.

daemons/lvmetad/lvmetad-core.c
libdaemon/server/daemon-log.c

index 0a1c8849c745a1e513db48c297eefe0461abde39..e1cb583bd4642702e879098ced8ff0969328d584 100644 (file)
@@ -950,7 +950,7 @@ static void _dump_cft(struct buffer *buf, struct dm_hash_table *ht, const char *
                struct dm_config_tree *cft = dm_hash_get_data(ht, n);
                const char *key_backup = cft->root->key;
                cft->root->key = dm_config_find_str(cft->root, key_addr, "unknown");
-               dm_config_write_node(cft->root, buffer_line, buf);
+               (void) dm_config_write_node(cft->root, buffer_line, buf);
                cft->root->key = key_backup;
                n = dm_hash_get_next(ht, n);
        }
@@ -969,9 +969,9 @@ static void _dump_pairs(struct buffer *buf, struct dm_hash_table *ht, const char
                           *val = dm_hash_get_data(ht, n);
                buffer_append(buf, "    ");
                if (int_key)
-                       dm_asprintf(&append, "%d = \"%s\"", *(int*)key, val);
+                       (void) dm_asprintf(&append, "%d = \"%s\"", *(int*)key, val);
                else
-                       dm_asprintf(&append, "%s = \"%s\"", key, val);
+                       (void) dm_asprintf(&append, "%s = \"%s\"", key, val);
                if (append)
                        buffer_append(buf, append);
                buffer_append(buf, "\n");
index 6f5f4dc4548c4ca795ebb5e3e3fd56deac1ce05a..c9e133c43e03d5c6770ac4bada637856c26dc15f 100644 (file)
@@ -98,7 +98,7 @@ void daemon_log_cft(log_state *s, int type, const char *prefix, const struct dm_
        if (!_type_interesting(s, type))
                return;
 
-       dm_config_write_node(n, &_log_line, &b);
+       (void) dm_config_write_node(n, &_log_line, &b);
 }
 
 void daemon_log_multi(log_state *s, int type, const char *prefix, const char *msg)
This page took 0.040516 seconds and 5 git commands to generate.