summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2015-11-06 16:53:55 +0100
committerDavid Sterba <dsterba@suse.com>2015-11-06 16:53:55 +0100
commit4e01c34b8bf06268a515b7ffe83e905b0a02ef38 (patch)
tree391f12e7fcab1172ef3326579d27c39e4b77b3de /utils.c
parent49e0f3e6466db78fb6c12f71e0c46be4b1492d90 (diff)
btrfs-progs: simplify empty stirngs check
We can do a strlen(str) == 0 in a simpler way. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index d546bea2..9c7cb892 100644
--- a/utils.c
+++ b/utils.c
@@ -1516,7 +1516,7 @@ int btrfs_register_all_devices(void)
list_for_each_entry(fs_devices, all_uuids, list) {
list_for_each_entry(device, &fs_devices->devices, dev_list) {
- if (strlen(device->name) != 0) {
+ if (*device->name) {
err = btrfs_register_one_device(device->name);
if (err < 0)
return err;