Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet6 Remove write-only variable "derived" in esp_cbc...



details:   https://anonhg.NetBSD.org/src/rev/c37ca45307c2
branches:  trunk
changeset: 583655:c37ca45307c2
user:      tron <tron%NetBSD.org@localhost>
date:      Thu Aug 18 07:54:09 2005 +0000

description:
Remove write-only variable "derived" in esp_cbc_encrypt().

diffstat:

 sys/netinet6/esp_core.c |  8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diffs (46 lines):

diff -r 36d77ffbc0dc -r c37ca45307c2 sys/netinet6/esp_core.c
--- a/sys/netinet6/esp_core.c   Thu Aug 18 06:07:30 2005 +0000
+++ b/sys/netinet6/esp_core.c   Thu Aug 18 07:54:09 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: esp_core.c,v 1.33 2003/08/27 00:08:31 thorpej Exp $    */
+/*     $NetBSD: esp_core.c,v 1.34 2005/08/18 07:54:09 tron Exp $       */
 /*     $KAME: esp_core.c,v 1.53 2001/11/27 09:47:30 sakane Exp $       */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp_core.c,v 1.33 2003/08/27 00:08:31 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp_core.c,v 1.34 2005/08/18 07:54:09 tron Exp $");
 
 #include "opt_inet.h"
 
@@ -634,7 +634,6 @@
        int scutoff;
        int i;
        int blocklen;
-       int derived;
 
        if (ivlen != sav->ivlen || ivlen > sizeof(iv)) {
                ipseclog((LOG_ERR, "esp_cbc_decrypt %s: "
@@ -659,7 +658,6 @@
                /* RFC 1827 */
                ivoff = off + sizeof(struct esp);
                bodyoff = off + sizeof(struct esp) + ivlen;
-               derived = 0;
        } else {
                /* RFC 2406 */
                if (sav->flags & SADB_X_EXT_DERIV) {
@@ -670,11 +668,9 @@
                        ivoff = off + sizeof(struct esp);
                        bodyoff = off + sizeof(struct esp) + sizeof(u_int32_t);
                        ivlen = sizeof(u_int32_t);
-                       derived = 1;
                } else {
                        ivoff = off + sizeof(struct newesp);
                        bodyoff = off + sizeof(struct newesp) + ivlen;
-                       derived = 0;
                }
        }
 



Home | Main Index | Thread Index | Old Index