RE: [PATCH] makedumpfile: fix a typo for checking the file pointer for null.

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

 



-----Original Message-----
> From: Nisha Parrakat <nisha.parrakat@xxxxxxxx>
> 
> Description:
> Static code analysis of makedumpfile code shows a mistake in checking
> the validity of a file descripter just attempted to open.
> 
> arch/ppc64.c: fixed the typo that missed checking fpb that was last attempted to open.
> 
> Found during cppcheck on the code.
> 
> Signed-off-by: Nisha Parrakat <Nisha.Parrakat@xxxxxxxx>
> 
> --- a/arch/ppc64.c	2019-01-29 23:08:27.099027763 +0100
> +++ b/arch/ppc64.c	2019-01-29 23:08:58.567379337 +0100
> @@ -623,7 +623,7 @@
>  		return FALSE;
>  	}
>  	fpb = fopen(f_crashbase, "r");
> -	if (!fp) {
> +	if (!fpb) {
>  		ERRMSG("Cannot open %s\n", f_crashbase);
>  		fclose(fp);
>  		return FALSE;
> 

Thanks, applied to the devel branch.

Kazu




_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux