summaryrefslogtreecommitdiff
path: root/string-table.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 /string-table.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 'string-table.c')
-rw-r--r--string-table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string-table.c b/string-table.c
index 7e01412d..fc9d51ee 100644
--- a/string-table.c
+++ b/string-table.c
@@ -101,7 +101,7 @@ void table_dump(struct string_table *tab)
continue;
len = strlen(tab->cells[idx]) - 1;
- if (len < 1 || tab->cells[idx][0] == '*')
+ if (len == 0 || tab->cells[idx][0] == '*')
continue;
if (len > sizes[i])