From 95c78ce92b6f6f65267156c0facf2944fb6e511f Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Fri, 11 Jul 2008 22:23:42 +0000 Subject: [PATCH] * lib/gshadow.c: Avoid assignments in comparison. --- ChangeLog | 4 ++++ lib/gshadow.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3df04570..63ffa486 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-07-12 Nicolas François + + * lib/gshadow.c: Avoid assignments in comparison. + 2008-07-12 Nicolas François * ChangeLog, NEWS, src/login.c: Re-inject the changes from 4.1.2.1. diff --git a/lib/gshadow.c b/lib/gshadow.c index 6f5a3d91..202cad3a 100644 --- a/lib/gshadow.c +++ b/lib/gshadow.c @@ -86,7 +86,8 @@ static char **build_list (char *s, char **list[], size_t * nlist) while (s != NULL && *s != '\0') { size = (nelem + 1) * sizeof (ptr); - if ((ptr = realloc (*list, size)) != NULL) { + ptr = realloc (*list, size); + if (NULL != ptr) { ptr[nelem] = s; nelem++; *list = ptr; -- 2.40.0