diff options
author | Toomas Soome <tsoome@me.com> | 2022-10-04 14:53:55 +0300 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2022-10-24 20:23:37 +0300 |
commit | 00ae59338e3e57fe8bfe8118360a47a69bfd8b98 (patch) | |
tree | 7af6cffaec3a4ec189509065895d615b35e7e6bc /usr/src/lib/libc/port/gen/getut.c | |
parent | 1a613b61205f4ee9a9fb00184dbe6cae17a6ede7 (diff) | |
download | illumos-gate-00ae59338e3e57fe8bfe8118360a47a69bfd8b98.tar.gz |
15054 libc: using the result of an assignment as a condition without parentheses
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Approved by: Dan McDonald <danmcd@mnx.io>
Diffstat (limited to 'usr/src/lib/libc/port/gen/getut.c')
-rw-r--r-- | usr/src/lib/libc/port/gen/getut.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/lib/libc/port/gen/getut.c b/usr/src/lib/libc/port/gen/getut.c index a622293d73..024eb76b53 100644 --- a/usr/src/lib/libc/port/gen/getut.c +++ b/usr/src/lib/libc/port/gen/getut.c @@ -25,7 +25,7 @@ */ /* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* All Rights Reserved */ /* * Compatibility routines to read and write alternate @@ -64,7 +64,7 @@ static void utmp_frec2api(const struct futmp *, struct utmp *); static void utmp_api2frec(const struct utmp *, struct futmp *); -struct utmp *_compat_getutent(void); +struct utmp *_compat_getutent(void); struct utmp *_compat_getutid(const struct utmp *); struct utmp *_compat_getutline(const struct utmp *); struct utmp *_compat_pututline(const struct utmp *); @@ -553,7 +553,7 @@ _compat_modut(struct utmp *utp) /* copy the supplied utmp structure someplace safe */ utmp = *utp; _compat_setutent(); - while (fup = getutent_frec()) { + while ((fup = getutent_frec()) != NULL) { if (idcmp(ucp->ut_id, fup->ut_id)) continue; break; |