svn commit: r359278 - head/usr.sbin/newsyslog
Mark Johnston
markj at FreeBSD.org
Tue Mar 24 18:25:29 UTC 2020
Author: markj
Date: Tue Mar 24 18:17:10 2020
New Revision: 359278
URL: https://svnweb.freebsd.org/changeset/base/359278
Log:
newsyslog: Add fallthrough comments to appease Coverity.
CID: 1008165, 1008166, 1008167
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Modified:
head/usr.sbin/newsyslog/ptimes.c
Modified: head/usr.sbin/newsyslog/ptimes.c
==============================================================================
--- head/usr.sbin/newsyslog/ptimes.c Tue Mar 24 18:16:56 2020 (r359277)
+++ head/usr.sbin/newsyslog/ptimes.c Tue Mar 24 18:17:10 2020 (r359278)
@@ -147,18 +147,22 @@ parse8601(struct ptime_data *ptime, const char *s)
case 8:
tm.tm_year = ((l / 1000000) - 19) * 100;
l = l % 1000000;
+ /* FALLTHROUGH */
case 6:
ptime->tmspec |= TSPEC_YEAR;
tm.tm_year -= tm.tm_year % 100;
tm.tm_year += l / 10000;
l = l % 10000;
+ /* FALLTHROUGH */
case 4:
ptime->tmspec |= TSPEC_MONTHOFYEAR;
tm.tm_mon = (l / 100) - 1;
l = l % 100;
+ /* FALLTHROUGH */
case 2:
ptime->tmspec |= TSPEC_DAYOFMONTH;
tm.tm_mday = l;
+ /* FALLTHROUGH */
case 0:
break;
default:
@@ -180,12 +184,15 @@ parse8601(struct ptime_data *ptime, const char *s)
case 6:
tm.tm_sec = l % 100;
l /= 100;
+ /* FALLTHROUGH */
case 4:
tm.tm_min = l % 100;
l /= 100;
+ /* FALLTHROUGH */
case 2:
ptime->tmspec |= TSPEC_HOUROFDAY;
tm.tm_hour = l;
+ /* FALLTHROUGH */
case 0:
break;
default:
More information about the svn-src-head
mailing list