]> The Tcpdump Group git mirrors - tcpdump/commitdiff
#ifdef out a bunch of variables unused if HAVE_LIBCRYPTO isn't defined,
authorguy <guy>
Wed, 6 Aug 2003 04:59:48 +0000 (04:59 +0000)
committerguy <guy>
Wed, 6 Aug 2003 04:59:48 +0000 (04:59 +0000)
and make the initialization of some that are otherwise unused if
HAVE_LIBCRYPTO isn't defined conditional on it being defined and #ifdef
them out, too.

#ifndef in some _U_'s for parameters not used if HAVE_LIBCRYPTO isn't
defined.

print-esp.c

index cc3c1ef81a4a308035338e03ff16fb6d31cd7a65..cc9236aed66092e894cc6a863d668cda6e7ee94f 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-esp.c,v 1.42 2003-07-17 13:43:24 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-esp.c,v 1.43 2003-08-06 04:59:48 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -331,10 +331,20 @@ static void esp_init(void)
 #endif
 
 int
-esp_print(const u_char *bp, const u_char *bp2, int *nhdr, int *padlen)
+esp_print(const u_char *bp, const u_char *bp2
+#ifndef HAVE_LIBCRYPTO
+       _U_
+#endif
+       ,
+       int *nhdr, int *padlen
+#ifndef HAVE_LIBCRYPTO
+       _U_
+#endif
+       )
 {
        register const struct newesp *esp;
        register const u_char *ep;
+#ifdef HAVE_LIBCRYPTO
        struct ip *ip;
        struct sa_list *sa = NULL;
        int espsecret_keylen;
@@ -346,7 +356,6 @@ esp_print(const u_char *bp, const u_char *bp2, int *nhdr, int *padlen)
        char *secret;
        int ivlen = 0;
        u_char *ivoff;
-#ifdef HAVE_LIBCRYPTO
        const u_char *p;
        EVP_CIPHER_CTX ctx;
        int blocksz;
@@ -354,10 +363,11 @@ esp_print(const u_char *bp, const u_char *bp2, int *nhdr, int *padlen)
 #endif
 
        esp = (struct newesp *)bp;
+
+#ifdef HAVE_LIBCRYPTO
        secret = NULL;
        advance = 0;
 
-#ifdef HAVE_LIBCRYPTO
        if (!initialized) {
                esp_init();
                initialized = 1;