summaryrefslogtreecommitdiffstats
path: root/include/protocols
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2013-04-12 20:48:55 +0000
committersjg <sjg@FreeBSD.org>2013-04-12 20:48:55 +0000
commit97d8b9495668afa398ab17c8c5f7e223b5fd2e89 (patch)
tree54038c9ac32a45f8741dcc23fb9a8ffc0e15ff89 /include/protocols
parent5ee3bfdb338e7c80af29a67f4425c4be24c7b866 (diff)
parent086d73aef6d0ab7d21daa2076fdc8d25961f9b05 (diff)
downloadFreeBSD-src-97d8b9495668afa398ab17c8c5f7e223b5fd2e89.zip
FreeBSD-src-97d8b9495668afa398ab17c8c5f7e223b5fd2e89.tar.gz
sync from head
Diffstat (limited to 'include/protocols')
-rw-r--r--include/protocols/timed.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/protocols/timed.h b/include/protocols/timed.h
index 18747be..d26b4a2 100644
--- a/include/protocols/timed.h
+++ b/include/protocols/timed.h
@@ -90,11 +90,13 @@ struct tsp {
#define TSPTYPENUMBER 25
#ifdef TSPTYPES
-const char *tsptype[TSPTYPENUMBER] =
+static char const * const tsptype[] =
{ "ANY", "ADJTIME", "ACK", "MASTERREQ", "MASTERACK", "SETTIME", "MASTERUP",
"SLAVEUP", "ELECTION", "ACCEPT", "REFUSE", "CONFLICT", "RESOLVE", "QUIT",
"DATE", "DATEREQ", "DATEACK", "TRACEON", "TRACEOFF", "MSITE", "MSITEREQ",
"TEST", "SETDATE", "SETDATEREQ", "LOOP" };
+_Static_assert(sizeof(tsptype) / sizeof(const char *) == TSPTYPENUMBER,
+ "Size of tsptype does not match TSPTYPENUMBER");
#endif
#endif /* !_TIMED_H_ */
OpenPOWER on IntegriCloud