[U-Boot] [PATCH v2 1/1] malloc: don't compare pointers to 0

Bin Meng bmeng.cn at gmail.com
Mon Nov 20 09:36:26 UTC 2017


On Sat, Nov 11, 2017 at 4:46 AM, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> 0 is not a pointer. So do not compare pointers to 0.
>
> Do not return 0 from functions with a pointer return
> type.
>
> Problem identified with Coccinelle.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
> v2
>         Fix more occurences of the problem.
> v1
>         [PATCH 1/1] malloc: compare pointer to NULL not to 0.
>         https://patchwork.ozlabs.org/patch/836850/
> ---
>  common/dlmalloc.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list