]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-rsvp.c
CI: Add warning exemptions for Sun C (suncc-5.15) on Solaris 10
[tcpdump] / print-rsvp.c
index ce29e42dc6f216057ee10af51950c5083c374451..153070e83537339e596dadc0051491b60b543897 100644 (file)
@@ -19,9 +19,7 @@
 
 /* specification: RFC 2205 */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "netdissect-stdinc.h"
 
@@ -461,7 +459,7 @@ static const struct tok rsvp_obj_error_code_diffserv_te_values[] = {
     { 6,                      "CT/setup priority and CT/holding priority do not form a configured TE-Class" },
     { 7,                      "Inconsistency between signaled PSC and signaled CT" },
     { 8,                      "Inconsistency between signaled PHBs and signaled CT" },
-   { 0, NULL}
+    { 0, NULL}
 };
 
 /* rfc3473 / rfc 3471 */
@@ -681,7 +679,7 @@ rsvp_obj_print(netdissect_options *ndo,
     u_short rsvp_obj_len,rsvp_obj_ctype,rsvp_obj_class_num;
     u_int obj_tlen,intserv_serv_tlen;
     int hexdump;
-    u_int processed,padbytes,error_code,error_value,i,sigcheck;
+    u_int processed,padbytes,error_code,error_value,sigcheck;
     u_int namelen;
 
     u_int action, subchannel;
@@ -1204,8 +1202,7 @@ rsvp_obj_print(netdissect_options *ndo,
                 if (obj_tlen < 4+namelen)
                     goto obj_tooshort;
                 ND_PRINT("%s  Session Name: ", indent);
-                for (i = 0; i < namelen; i++)
-                    fn_print_char(ndo, GET_U_1(obj_tptr + 4 + i));
+                nd_printjn(ndo, obj_tptr + 4, namelen);
                 ND_PRINT("%s  Setup Priority: %u, Holding Priority: %u, Flags: [%s] (%#x)",
                        indent,
                        GET_U_1(obj_tptr),