]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Don't use safeputchar() if unneeded
authorFrancois-Xavier Le Bail <[email protected]>
Mon, 30 Apr 2018 12:03:17 +0000 (14:03 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 30 Apr 2018 12:03:17 +0000 (14:03 +0200)
print-hncp.c

index 471161f1dbf8007f02fba880d28da807d4f62600..ab190dd564bb3b8b9c207dd20ade3494efc4dad9 100644 (file)
@@ -248,7 +248,7 @@ print_dns_label(netdissect_options *ndo,
         if (lab_length == 0)
             return (int)length;
         if (length > 1 && print)
-            safeputchar(ndo, '.');
+            ND_PRINT(".");
         if (length+lab_length > max_length) {
             if (print)
                 safeputs(ndo, cp+length, max_length-length);
@@ -818,9 +818,9 @@ hncp_print_rec(netdissect_options *ndo,
                 format_ip6addr(ndo, value)
             );
             if (l < 64) {
-                safeputchar(ndo, '"');
+                ND_PRINT("\"");
                 safeputs(ndo, value + 17, l);
-                safeputchar(ndo, '"');
+                ND_PRINT("\"");
             } else {
                 ND_PRINT("%s", istr);
             }