]> The Tcpdump Group git mirrors - tcpdump/commitdiff
NTP: Use tstr for truncation indicator.
authorDenis Ovsienko <[email protected]>
Mon, 4 Sep 2017 11:03:07 +0000 (12:03 +0100)
committerDenis Ovsienko <[email protected]>
Mon, 4 Sep 2017 11:30:20 +0000 (12:30 +0100)
This implements the same convention as in all other decoders.

print-ntp.c

index 2a42c8f61bcabc18192b4f0d2d9941863b216f2f..a7d32bdf2d3ce46360b4a8a0da91219b9894772b 100644 (file)
@@ -38,6 +38,8 @@
 #include "addrtoname.h"
 #include "extract.h"
 
+static const char tstr[] = " [|ntp]";
+
 /*
  * Based on ntp.h from the U of MD implementation
  *     This file is based on Version 2 of the NTP spec (RFC1119).
@@ -386,7 +388,7 @@ invalid:
        return;
 
 trunc:
-       ND_PRINT((ndo, " [|ntp]"));
+       ND_PRINT((ndo, " %s", tstr));
 }
 
 /*
@@ -429,7 +431,7 @@ ntp_control_print(netdissect_options *ndo,
        return;
 
 trunc:
-       ND_PRINT((ndo, " [|ntp]"));
+       ND_PRINT((ndo, " %s", tstr));
 }
 
 union ntpdata {
@@ -478,7 +480,7 @@ ntp_print(netdissect_options *ndo,
        return;
 
 trunc:
-       ND_PRINT((ndo, " [|ntp]"));
+       ND_PRINT((ndo, " %s", tstr));
 }
 
 static void