[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH 02/29] Fix check for empty system_dir



Zdenek Kabelac <zkabelac 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]