From: Ben Harris Date: Sun, 17 Nov 2002 02:00:06 +0000 (+0000) Subject: Apple's C compilers don't think that putting parentheses around assignments X-Git-Tag: r8855-g4f798d~2016 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=782b3164ef5fe2b7e40f600103d17dbad831a158;p=PuTTY_svn.git Apple's C compilers don't think that putting parentheses around assignments in "if" conditions is enough. Use an actual comparison against NULL instead. git-svn-id: http://svn.tartarus.org/sgt/putty@2216 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/settings.c b/settings.c index 833a10d2..47524db6 100644 --- a/settings.c +++ b/settings.c @@ -670,7 +670,7 @@ void get_sesslist(struct sesslist *list, int allocate) buflen = bufsize = 0; list->buffer = NULL; - if ((handle = enum_settings_start())) { + if ((handle = enum_settings_start()) != NULL) { do { ret = enum_settings_next(handle, otherbuf, sizeof(otherbuf)); if (ret) {