]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
snmp: update signature of fmtaddr and send functions
authorVincent Bernat <vincent@bernat.ch>
Sat, 1 Feb 2020 15:27:42 +0000 (16:27 +0100)
committerVincent Bernat <vincent@bernat.ch>
Sat, 1 Feb 2020 15:31:03 +0000 (16:31 +0100)
This is backward compatible as a function accepting `const void *`
will also accept `void *`.

src/daemon/agent_priv.c

index 6a126fe84134d616961b2326cecc15007035aae6..c2a9b32fd31d7657f99f1993ca2dc34187c5cc44 100644 (file)
@@ -37,7 +37,7 @@ static oid netsnmp_unix[] = { TRANSPORT_DOMAIN_LOCAL };
 static netsnmp_tdomain unixDomain;
 
 static char *
-agent_priv_unix_fmtaddr(netsnmp_transport *t, void *data, int len)
+agent_priv_unix_fmtaddr(netsnmp_transport *t, const void *data, int len)
 {
        /* We don't bother to implement the full function */
        return strdup("Local Unix socket with privilege separation: unknown");
@@ -80,7 +80,7 @@ recv_error:
 
 #define AGENT_WRITE_TIMEOUT 2000
 static int
-agent_priv_unix_send(netsnmp_transport *t, void *buf, int size,
+agent_priv_unix_send(netsnmp_transport *t, const void *buf, int size,
     void **opaque, int *olength)
 {
        int rc = -1;