1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

libdm-config: replace check for 0

No need to call strlen() when checking for zero length string.
This commit is contained in:
Zdenek Kabelac 2021-03-07 21:52:10 +01:00
parent ca12dae32b
commit d3cff64408

View File

@ -599,7 +599,7 @@ static struct dm_config_node *_section(struct parser *p, struct dm_config_node *
match(TOK_IDENTIFIER);
}
if (!strlen(str)) {
if (!*str) {
log_error("Parse error at byte %" PRIptrdiff_t " (line %d): empty section identifier",
p->tb - p->fb + 1, p->line);
return NULL;