[lvm-devel] [PATCH 02/29] Fix check for empty system_dir
Petr Rockai
prockai at redhat.com
Thu Nov 25 17:19:26 UTC 2010
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.
> @@ -1036,7 +1036,7 @@ static int _init_backup(struct cmd_context *cmd)
> char default_dir[PATH_MAX];
> const char *dir;
>
> - if (!cmd->system_dir) {
> + if (!*cmd->system_dir) {
> log_warn("WARNING: Metadata changes will NOT be backed up");
> backup_init(cmd, "", 0);
> archive_init(cmd, "", 0, 0, 0);
More information about the lvm-devel
mailing list