projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a5e7a3
)
snmp plugin: Cast the `bitstring' to (char *).
author
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Fri, 1 Jun 2007 16:06:52 +0000
(18:06 +0200)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Fri, 1 Jun 2007 16:06:52 +0000
(18:06 +0200)
The implementation apparently differs between versions.
src/snmp.c
patch
|
blob
|
history
diff --git
a/src/snmp.c
b/src/snmp.c
index
6e15a61
..
64f41ad
100644
(file)
--- 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);