summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: feadfeb)
raw | patch | inline | side by side (parent: feadfeb)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 5 Mar 2016 12:04:59 +0000 (13:04 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 5 Mar 2016 12:04:59 +0000 (13:04 +0100) |
src/ntpd.c | patch | blob | history |
diff --git a/src/ntpd.c b/src/ntpd.c
index 5ae60b057f6454ce65c7d9668d2d0b96cd77f0b6..4a31e455eece36ad595f8bbc41ac7ee6985c35e7 100644 (file)
--- a/src/ntpd.c
+++ b/src/ntpd.c
};
/* List of reference clock names */
-static char *refclock_names[] =
+static const char *refclock_names[] =
{
"UNKNOWN", "LOCAL", "GPS_TRAK", "WWV_PST", /* 0- 3 */
"SPECTRACOM", "TRUETIME", "IRIG_AUDIO", "CHU_AUDIO", /* 4- 7 */
return (0);
}
-static void ntpd_submit (char *type, char *type_inst, gauge_t value)
+static void ntpd_submit (const char *type, const char *type_inst, gauge_t value)
{
value_t values[1];
value_list_t vl = VALUE_LIST_INIT;
/* Each time a peer is polled, ntpd shifts the reach register to the left and
* sets the LSB based on whether the peer was reachable. If the LSB is zero,
* the values are out of date. */
-static void ntpd_submit_reach (char *type, char *type_inst, uint8_t reach,
- gauge_t value)
+static void ntpd_submit_reach (const char *type, const char *type_inst,
+ uint8_t reach, gauge_t value)
{
if (!(reach & 1))
value = NAN;
static int ntpd_connect (void)
{
- char *host;
- char *port;
+ const char *host;
+ const char *port;
struct addrinfo ai_hints;
struct addrinfo *ai_list;