contrib/arpwatch/53_stop-using-_getshort.patch

26 lines
713 B
Diff

Description: replace private function _getshort with ns_get16
_getshort is a private function, triggers a build log warning because it's
not present in any header file. We switch to the functionally equivalent
ns_get16.
Author: Lukas Schwaighofer <lukas@schwaighofer.name>
---
dns.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/dns.c
+++ b/dns.c
@@ -115,10 +115,10 @@
(u_char *)cp, (char *)bp, buflen)) < 0)
break;
cp += n;
- type = _getshort(cp);
+ type = ns_get16(cp);
cp += sizeof(u_short); /* class */
cp += sizeof(u_short) + sizeof(u_int32_t);
- n = _getshort(cp);
+ n = ns_get16(cp);
cp += sizeof(u_short);
if (type == T_HINFO) {
/* Unpack */