diff options
-rw-r--r-- | libblkid/src/tag.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libblkid/src/tag.c b/libblkid/src/tag.c index 281612a7a..c6bc37678 100644 --- a/libblkid/src/tag.c +++ b/libblkid/src/tag.c @@ -161,7 +161,7 @@ int blkid_set_tag(blkid_dev dev, const char *name, /* Existing tag not present, add to device */ if (!(t = blkid_new_tag())) goto errout; - t->bit_name = name ? strdup(name) : NULL; + t->bit_name = strdup(name); t->bit_val = val; t->bit_dev = dev; @@ -176,7 +176,7 @@ int blkid_set_tag(blkid_dev dev, const char *name, goto errout; DBG(TAG, ul_debug(" creating new cache tag head %s", name)); - head->bit_name = name ? strdup(name) : NULL; + head->bit_name = strdup(name); if (!head->bit_name) goto errout; list_add_tail(&head->bit_tags, @@ -237,7 +237,7 @@ int blkid_parse_tag_string(const char *token, char **ret_type, char **ret_val) } if (ret_val) { - value = value && *value ? strdup(value) : NULL; + value = *value ? strdup(value) : NULL; if (!value) goto errout; *ret_val = value; |