[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [PATCH 1/2] check stat's result and avoid calling stat
From: |
Mike Frysinger |
Subject: |
Re: [Nano-devel] [PATCH 1/2] check stat's result and avoid calling stat on a NULL pointer |
Date: |
Sun, 28 Nov 2010 17:22:10 -0500 |
User-agent: |
KMail/1.13.5 (Linux/2.6.36; KDE/4.5.2; x86_64; ; ) |
On Sunday, November 28, 2010 15:08:12 Kamil Dudka wrote:
> +void stat_if_needed(const char *filename, struct stat **pstat)
static
> + tmp = (struct stat *)nmalloc(sizeof(struct stat));
not really specific to your patch, but the cast is useless and the sizeof
would prob be better as sizeof(*tmp)
> + if (0 == stat(filename, tmp))
order is reveresed from standard nano coding style
-mike
signature.asc
Description: This is a digitally signed message part.