[Ocfs2-tools-devel] [PATCH] mkfs.ocfs2: clean up deadcode in is_cluster_info_valid()

Joseph Qi joseph.qi at huawei.com
Sat Oct 8 18:50:21 PDT 2016


Reviewed-by: Joseph Qi <joseph.qi at huawei.com>

On 2016/9/30 16:14, piaojun wrote:
> Execution cannot reach this statement as NULL-checker has tested
> all of 'stack_name', 'cluster_name', 'globalhb' before.
> 
> Signed-off-by: Jun Piao <piaojun at huawei.com>
> ---
>  mkfs.ocfs2/mkfs.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/mkfs.ocfs2/mkfs.c b/mkfs.ocfs2/mkfs.c
> index 8532e12..7e14d17 100644
> --- a/mkfs.ocfs2/mkfs.c
> +++ b/mkfs.ocfs2/mkfs.c
> @@ -176,7 +176,6 @@ static int is_cluster_info_valid(State *s, char *stack_name,
>  				"the specified cluster attribute");
>  			return 0;
>  		}
> -		return 1;
>  	}
>  
>  	if (!stack_name || !strlen(stack_name)) {
> 





More information about the Ocfs2-tools-devel mailing list