[pacman-dev] [PATCH] Changed implicit NULL check to explicit one, to comply with style guide.

Terry Bolt bolt.terry at gmail.com
Wed Dec 23 01:38:04 UTC 2015


What about lib/libalpm/diskspace.c:183:

for(ptr = mount_points; ptr != NULL; ptr = ptr->next) {

On 23 December 2015 at 01:31, Allan McRae <allan at archlinux.org> wrote:

> On 23/12/15 10:27, Terry Bolt wrote:
> > Signed-off-by: Terry Bolt <bolt.terry at gmail.com>
> > ---
> >  lib/libalpm/diskspace.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
>
> That does not really comply with the coding style given every other loop
> is like the original.
>
> A
>
> > diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c
> > index 5bb2173..7ee1289 100644
> > --- a/lib/libalpm/diskspace.c
> > +++ b/lib/libalpm/diskspace.c
> > @@ -62,7 +62,7 @@ static void mount_point_list_free(alpm_list_t
> *mount_points)
> >  {
> >       alpm_list_t *i;
> >
> > -     for(i = mount_points; i; i = i->next) {
> > +     for(i = mount_points; i != NULL; i = i->next) {
> >               alpm_mountpoint_t *data = i->data;
> >               FREE(data->mount_dir);
> >       }
> >
>


More information about the pacman-dev mailing list