summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
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 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