Don't declare variables in the middle of a block of code; in C89, that's
authorguy <guy>
Thu, 13 Sep 2007 17:33:54 +0000 (17:33 +0000)
committerguy <guy>
Thu, 13 Sep 2007 17:33:54 +0000 (17:33 +0000)
not valid.

print-rsvp.c

index 81e8fa66636ecfb9d420603c33d3708540647706..07eb11086afa9dd6596a91b0598455b26e821080 100644 (file)
@@ -17,7 +17,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.33.2.14 2007-02-26 13:32:36 hannes Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.33.2.15 2007-09-13 17:33:54 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,