]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-rsvp.c
Don't print timestamps to a buffer and then print the buffer.
[tcpdump] / print-rsvp.c
index 27b6933d1aec0e6c301c49933a40e18cdb34bdbf..2875a1755190d55840e1559b8ce15bd76ce3a13c 100644 (file)
@@ -33,7 +33,6 @@
 #include "af.h"
 #include "signature.h"
 
-static const char tstr[] = " [|rsvp]";
 
 /*
  * RFC 2205 common header
@@ -643,7 +642,7 @@ rsvp_intserv_print(netdissect_options *ndo,
     return (parameter_length+4); /* header length 4 bytes */
 
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
     return 0;
 }
 
@@ -1185,7 +1184,7 @@ rsvp_obj_print(netdissect_options *ndo,
                     return-1;
                 ND_PRINT("%s  Session Name: ", indent);
                 for (i = 0; i < namelen; i++)
-                    safeputchar(ndo, EXTRACT_U_1(obj_tptr + 4 + i));
+                    fn_print_char(ndo, EXTRACT_U_1(obj_tptr + 4 + i));
                 ND_PRINT("%s  Setup Priority: %u, Holding Priority: %u, Flags: [%s] (%#x)",
                        indent,
                        EXTRACT_U_1(obj_tptr),
@@ -1779,7 +1778,7 @@ rsvp_obj_print(netdissect_options *ndo,
 
                 ND_PRINT("%s  Action: %s (%u), Label type: %u", indent,
                        tok2str(rsvp_obj_label_set_action_values, "Unknown", action),
-                       action, ((EXTRACT_BE_U_4(obj_tptr) & 0x7F)));
+                       action, (EXTRACT_BE_U_4(obj_tptr) & 0x7F));
 
                 switch (action) {
                 case LABEL_SET_INCLUSIVE_RANGE:
@@ -1866,8 +1865,7 @@ invalid:
     ND_PRINT("%s", istr);
     return -1;
 trunc:
-    ND_PRINT("\n\t\t");
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
     return -1;
 }
 
@@ -2020,6 +2018,5 @@ rsvp_print(netdissect_options *ndo,
 
     return;
 trunc:
-    ND_PRINT("\n\t\t");
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }