File: 53_stop-using-_getshort.patch

package info (click to toggle)
arpwatch 2.1a15-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,988 kB
  • sloc: sh: 3,047; ansic: 2,811; makefile: 90; awk: 90; perl: 15
file content (27 lines) | stat: -rw-r--r-- 754 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
@@ -109,11 +109,11 @@
 		    (u_char *)cp, (u_char *)bp, buflen)) < 0)
 			break;
 		cp += n;
-		type = _getshort(cp);
+		type = ns_get16(cp);
  		cp += sizeof(u_short);
-		class = _getshort(cp);
+		class = ns_get16(cp);
  		cp += sizeof(u_short) + sizeof(u_int32_t);
-		n = _getshort(cp);
+		n = ns_get16(cp);
 		cp += sizeof(u_short);
 		if (type == T_HINFO) {
 			/* Unpack */