aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2013-04-09 16:16:34 +0000
committerEd Schouten <ed@FreeBSD.org>2013-04-09 16:16:34 +0000
commit7c99b6764e47f50ceefaf02482e589a76216b05d (patch)
tree984c9ec0b986d4b7ad1f72e3a3107d82c5a5281c /include
parent8cf455b8d98631b1783769a96e9f5ad2551777a5 (diff)
Notes
Diffstat (limited to 'include')
-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 18747be7a111..d26b4a23980d 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_ */