]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: make oid_copy_addr respect my constness
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 24 Mar 2020 14:20:54 +0000 (10:20 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 26 Mar 2020 20:22:00 +0000 (16:22 -0400)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/smux.h
lib/snmp.c

index 3f860db0dc4af5f3c1222e224f072474de2827d4..6896f02354951dbd1435a050041b0852d99e38a2 100644 (file)
@@ -105,7 +105,7 @@ extern int smux_trap(struct variable *, size_t, const oid *, size_t,
 extern int oid_compare(const oid *, int, const oid *, int);
 extern void oid2in_addr(oid[], int, struct in_addr *);
 extern void *oid_copy(void *, const void *, size_t);
-extern void oid_copy_addr(oid[], struct in_addr *, int);
+extern void oid_copy_addr(oid[], const struct in_addr *, int);
 
 #ifdef __cplusplus
 }
index f11d9dc8cfde81fbea6b52092b282a8ab5883bf5..736a3c62b85f494da4d9112990dd83c4f7e0dcc2 100644 (file)
@@ -64,10 +64,10 @@ void oid2in_addr(oid oid[], int len, struct in_addr *addr)
                *pnt++ = oid[i];
 }
 
-void oid_copy_addr(oid oid[], struct in_addr *addr, int len)
+void oid_copy_addr(oid oid[], const struct in_addr *addr, int len)
 {
        int i;
-       uint8_t *pnt;
+       const uint8_t *pnt;
 
        if (len == 0)
                return;