]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-rsvp.c
Compile with -Wshadow
[tcpdump] / print-rsvp.c
index 3f96cb2503f6c28110ce8ead6899c060c5f5c488..2c510f30cda03574dce2740a5fe60f83948d7e7e 100644 (file)
@@ -15,7 +15,6 @@
  * Original code by Hannes Gredler ([email protected])
  */
 
-#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -486,8 +485,8 @@ static const struct tok rsvp_obj_generalized_uni_values[] = {
  */
 static int
 rsvp_intserv_print(netdissect_options *ndo,
-                   const u_char *tptr, u_short obj_tlen) {
-
+                   const u_char *tptr, u_short obj_tlen)
+{
     int parameter_id,parameter_length;
     union {
        float f;
@@ -637,8 +636,8 @@ _U_
 _U_
 #endif
 , const u_char *tptr,
-                const char *ident, u_int tlen) {
-
+                const char *ident, u_int tlen)
+{
     const struct rsvp_object_header *rsvp_obj_header;
     const u_char *obj_tptr;
     union {
@@ -658,8 +657,7 @@ _U_
 
     while(tlen>=sizeof(struct rsvp_object_header)) {
         /* did we capture enough for fully decoding the object header ? */
-        if (!ND_TTEST2(*tptr, sizeof(struct rsvp_object_header)))
-            goto trunc;
+        ND_TCHECK2(*tptr, sizeof(struct rsvp_object_header));
 
         rsvp_obj_header = (const struct rsvp_object_header *)tptr;
         rsvp_obj_len=EXTRACT_16BITS(rsvp_obj_header->length);
@@ -1796,8 +1794,8 @@ trunc:
 
 void
 rsvp_print(netdissect_options *ndo,
-           register const u_char *pptr, register u_int len) {
-
+           register const u_char *pptr, register u_int len)
+{
     struct rsvp_common_header *rsvp_com_header;
     const u_char *tptr,*subtptr;
     u_short plen, tlen, subtlen;