From 2608742b155472217a31b0781ab569926cbe54ba Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 1 Jun 2007 18:06:52 +0200 Subject: [PATCH] snmp plugin: Cast the `bitstring' to (char *). The implementation apparently differs between versions. --- src/snmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/snmp.c b/src/snmp.c index 6e15a61d..64f41ada 100644 --- a/src/snmp.c +++ b/src/snmp.c @@ -817,7 +817,7 @@ static int csnmp_read_table (struct snmp_session *sess_ptr, /* Get instance name */ if ((vb->type == ASN_OCTET_STR) || (vb->type == ASN_BIT_STR)) { - strncpy (il->instance, vb->val.bitstring, + strncpy (il->instance, (char *) vb->val.bitstring, sizeof (il->instance)); il->instance[sizeof (il->instance) - 1] = '\0'; DEBUG ("Before escape_slashes: %s", il->instance); -- 2.30.2