From: Florian Forster Date: Thu, 3 Dec 2015 06:17:15 +0000 (+0100) Subject: snmp plugin: Use the PRIu8 macro to format uint8_t values. X-Git-Tag: collectd-5.6.0~531 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4557bc77cfab048f96ff50957db08936d80b0ebf;p=collectd.git snmp plugin: Use the PRIu8 macro to format uint8_t values. --- diff --git a/src/snmp.c b/src/snmp.c index 23aefd51..0717365a 100644 --- a/src/snmp.c +++ b/src/snmp.c @@ -1108,11 +1108,11 @@ static int csnmp_strvbcopy (char *dst, /* {{{ */ src = (char *) vb->val.bitstring; else if (vb->type == ASN_IPADDRESS) { - return ssnprintf (dst, dst_size, "%d.%d.%d.%d", - (uint8_t)vb->val.string[0], - (uint8_t)vb->val.string[1], - (uint8_t)vb->val.string[2], - (uint8_t)vb->val.string[3]); + return ssnprintf (dst, dst_size, "%"PRIu8".%"PRIu8".%"PRIu8".%"PRIu8"", + (uint8_t) vb->val.string[0], + (uint8_t) vb->val.string[1], + (uint8_t) vb->val.string[2], + (uint8_t) vb->val.string[3]); } else {