]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Don't declare variables in the middle of a block of code; in C89, that's
authorguy <guy>
Thu, 13 Sep 2007 17:29:50 +0000 (17:29 +0000)
committerguy <guy>
Thu, 13 Sep 2007 17:29:50 +0000 (17:29 +0000)
not valid.

print-rsvp.c

index 88bc0255c9ce0015bd14b4deaf15e2c4eba233fa..5ed731c3dec041d8f4ce305f39881954f9efe9c2 100644 (file)
@@ -17,7 +17,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.47 2007-02-26 13:17:54 hannes Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.48 2007-09-13 17:29:50 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -631,6 +631,8 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
     } bw;
     u_int8_t namelen;
 
+    u_int action, subchannel;
+
     while(tlen>=sizeof(struct rsvp_object_header)) {
         /* did we capture enough for fully decoding the object header ? */
         if (!TTEST2(*tptr, sizeof(struct rsvp_object_header)))
@@ -1577,8 +1579,6 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
             case RSVP_CTYPE_1: 
                 if (obj_tlen < 4)
                     return-1;
-
-                u_int action, subchannel;
                 action = (EXTRACT_16BITS(obj_tptr)>>8);
 
                 printf("%s  Action: %s (%u), Label type: %u", ident,