projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
collectd-tg: fix warning
[collectd.git]
/
src
/
utils_dns.c
diff --git
a/src/utils_dns.c
b/src/utils_dns.c
index
37fa930
..
7b20e13
100644
(file)
--- a/
src/utils_dns.c
+++ b/
src/utils_dns.c
@@
-158,16
+158,16
@@
typedef int(printer)(const char *, ...);
*/
#if HAVE_PCAP_H
*/
#if HAVE_PCAP_H
-static pcap_t *pcap_obj
= NULL
;
+static pcap_t *pcap_obj;
#endif
#endif
-static ip_list_t *IgnoreList
= NULL
;
+static ip_list_t *IgnoreList;
#if HAVE_PCAP_H
#if HAVE_PCAP_H
-static void (*Callback)(const rfc1035_header_t *)
= NULL
;
+static void (*Callback)(const rfc1035_header_t *);
-static int query_count_intvl
= 0
;
-static int query_count_total
= 0
;
+static int query_count_intvl;
+static int query_count_total;
#ifdef __OpenBSD__
static struct bpf_timeval last_ts;
#else
#ifdef __OpenBSD__
static struct bpf_timeval last_ts;
#else
@@
-267,7
+267,7
@@
static int rfc1035NameUnpack(const char *buf, size_t sz, off_t *off, char *name,
off_t no = 0;
unsigned char c;
size_t len;
off_t no = 0;
unsigned char c;
size_t len;
- static int loop_detect
= 0
;
+ static int loop_detect;
if (loop_detect > 2)
return 4; /* compression loop */
if (ns == 0)
if (loop_detect > 2)
return 4; /* compression loop */
if (ns == 0)
@@
-912,7
+912,7
@@
const char *qtype_str(int t) {
return "ANY"; /* ... 255 */
#endif /* __BIND >= 19950621 */
default:
return "ANY"; /* ... 255 */
#endif /* __BIND >= 19950621 */
default:
- s
s
nprintf(buf, sizeof(buf), "#%i", t);
+ snprintf(buf, sizeof(buf), "#%i", t);
return buf;
} /* switch (t) */
}
return buf;
} /* switch (t) */
}
@@
-931,7
+931,7
@@
const char *opcode_str(int o) {
case 5:
return "Update";
default:
case 5:
return "Update";
default:
- s
s
nprintf(buf, sizeof(buf), "Opcode%d", o);
+ snprintf(buf, sizeof(buf), "Opcode%d", o);
return buf;
}
}
return buf;
}
}
@@
-998,7
+998,7
@@
const char *rcode_str(int rcode) {
#endif /* RFC2136 rcodes */
#endif /* __BIND >= 19950621 */
default:
#endif /* RFC2136 rcodes */
#endif /* __BIND >= 19950621 */
default:
- s
s
nprintf(buf, sizeof(buf), "RCode%i", rcode);
+ snprintf(buf, sizeof(buf), "RCode%i", rcode);
return buf;
}
} /* const char *rcode_str (int rcode) */
return buf;
}
} /* const char *rcode_str (int rcode) */