lib: make oid_copy_addr respect my constness

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2020-03-24 10:20:54 -04:00
parent 52a44d64b5
commit 4ce217af91
2 changed files with 3 additions and 3 deletions

View 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
}

View 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;