From: Ruben Kerkhof Date: Sat, 5 Mar 2016 11:45:57 +0000 (+0100) Subject: openvpn plugin: constify X-Git-Tag: collectd-5.6.0~433 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=1562a17eb4e110c0810b7873bbe2cbed983d6206;p=collectd.git openvpn plugin: constify --- diff --git a/src/openvpn.c b/src/openvpn.c index 93c8f1b5..8bccce38 100644 --- a/src/openvpn.c +++ b/src/openvpn.c @@ -95,7 +95,8 @@ static int openvpn_strsplit (char *string, char **fields, size_t size) } /* int openvpn_strsplit */ /* dispatches number of users */ -static void numusers_submit (char *pinst, char *tinst, gauge_t value) +static void numusers_submit (const char *pinst, const char *tinst, + gauge_t value) { value_t values[1]; value_list_t vl = VALUE_LIST_INIT; @@ -115,8 +116,10 @@ static void numusers_submit (char *pinst, char *tinst, gauge_t value) plugin_dispatch_values (&vl); } /* void numusers_submit */ -/* dispatches stats about traffic (TCP or UDP) generated by the tunnel per single endpoint */ -static void iostats_submit (char *pinst, char *tinst, derive_t rx, derive_t tx) +/* dispatches stats about traffic (TCP or UDP) generated by the tunnel + * per single endpoint */ +static void iostats_submit (const char *pinst, const char *tinst, + derive_t rx, derive_t tx) { value_t values[2]; value_list_t vl = VALUE_LIST_INIT; @@ -145,7 +148,7 @@ static void iostats_submit (char *pinst, char *tinst, derive_t rx, derive_t tx) } /* void traffic_submit */ /* dispatches stats about data compression shown when in single mode */ -static void compression_submit (char *pinst, char *tinst, +static void compression_submit (const char *pinst, const char *tinst, derive_t uncompressed, derive_t compressed) { value_t values[2]; @@ -168,7 +171,7 @@ static void compression_submit (char *pinst, char *tinst, plugin_dispatch_values (&vl); } /* void compression_submit */ -static int single_read (char *name, FILE *fh) +static int single_read (const char *name, FILE *fh) { char buffer[1024]; char *fields[4]; @@ -261,7 +264,7 @@ static int single_read (char *name, FILE *fh) } /* int single_read */ /* for reading status version 1 */ -static int multi1_read (char *name, FILE *fh) +static int multi1_read (const char *name, FILE *fh) { char buffer[1024]; char *fields[10]; @@ -324,7 +327,7 @@ static int multi1_read (char *name, FILE *fh) } /* int multi1_read */ /* for reading status version 2 */ -static int multi2_read (char *name, FILE *fh) +static int multi2_read (const char *name, FILE *fh) { char buffer[1024]; char *fields[10]; @@ -386,7 +389,7 @@ static int multi2_read (char *name, FILE *fh) } /* int multi2_read */ /* for reading status version 3 */ -static int multi3_read (char *name, FILE *fh) +static int multi3_read (const char *name, FILE *fh) { char buffer[1024]; char *fields[15]; @@ -451,7 +454,7 @@ static int multi3_read (char *name, FILE *fh) } /* int multi3_read */ /* for reading status version 4 */ -static int multi4_read (char *name, FILE *fh) +static int multi4_read (const char *name, FILE *fh) { char buffer[1024]; char *fields[11];