[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: |
Kamil Dudka |
Subject: |
Re: [Nano-devel] [PATCH 1/2] check stat's result and avoid calling stat on a NULL pointer |
Date: |
Mon, 6 Dec 2010 20:12:55 +0100 |
User-agent: |
KMail/1.9.10 |
On Sunday 28 November 2010 23:22:10 Mike Frysinger wrote:
> 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
Sorry for the delay. An updated patch is attached. Thanks for review!
Kamil
0001-check-stat-s-result-and-avoid-calling-stat-on-a-NULL.patch
Description: Text Data
- Re: [Nano-devel] [PATCH 1/2] check stat's result and avoid calling stat on a NULL pointer,
Kamil Dudka <=