[lvm-devel] [PATCH 02/29] Fix check for empty system_dir
Zdenek Kabelac
zkabelac at redhat.com
Thu Nov 25 23:12:43 UTC 2010
Dne 25.11.2010 18:19, Petr Rockai napsal(a):
> Zdenek Kabelac <zkabelac at redhat.com> writes:
>
>> Fixing most probably a typo - I assume original intention has been
>> to check for zero length string.
>
> In that case, please use !strlen(str), as that is much more readable.
>
In this case I believe it's common practice not only in our source to check
the first char for '\0' when checking for empty string - so are we planning to
replace in other places in lvm code - then I'd propose probably some nice
macro empty_string() or whatever name we could think of?
Zdenek
More information about the lvm-devel
mailing list