From 00ae59338e3e57fe8bfe8118360a47a69bfd8b98 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Tue, 4 Oct 2022 14:53:55 +0300 Subject: 15054 libc: using the result of an assignment as a condition without parentheses Reviewed by: Gordon Ross Approved by: Dan McDonald --- usr/src/lib/libc/port/gen/ctime.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'usr/src/lib/libc/port/gen/ctime.c') diff --git a/usr/src/lib/libc/port/gen/ctime.c b/usr/src/lib/libc/port/gen/ctime.c index c2a58b25b3..4f3b228598 100644 --- a/usr/src/lib/libc/port/gen/ctime.c +++ b/usr/src/lib/libc/port/gen/ctime.c @@ -25,9 +25,7 @@ */ /* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" +/* All Rights Reserved */ /* * This routine converts time as follows. @@ -117,7 +115,7 @@ __posix_asctime_r(const struct tm *t, char *cbuf) int year = t->tm_year + 1900; cp = cbuf; - for (ncp = Date; *cp++ = *ncp++; /* */) + for (ncp = Date; (*cp++ = *ncp++) != '\0'; /* */) ; ncp = Day + (3 * t->tm_wday); cp = cbuf; -- cgit v1.2.3