summaryrefslogtreecommitdiff
path: root/usr/src/lib/libc/port/gen/ctime.c
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2022-10-04 14:53:55 +0300
committerToomas Soome <tsoome@me.com>2022-10-24 20:23:37 +0300
commit00ae59338e3e57fe8bfe8118360a47a69bfd8b98 (patch)
tree7af6cffaec3a4ec189509065895d615b35e7e6bc /usr/src/lib/libc/port/gen/ctime.c
parent1a613b61205f4ee9a9fb00184dbe6cae17a6ede7 (diff)
downloadillumos-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/ctime.c')
-rw-r--r--usr/src/lib/libc/port/gen/ctime.c6
1 files changed, 2 insertions, 4 deletions
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;