Mailing List Archive

svn commit: vpnc r479 - /branches/vpnc-nortel/crypto-gnutls.c /branches/vpnc-nortel/tunip.c /trunk/crypto-gnutls.c /trunk/tunip.c
Author: Antonio Borneo
Date: Sun Nov 20 13:38:12 2011
New Revision: 479

Log:
Remove unused variables

Detected with clang/scan-build

Modified:
branches/vpnc-nortel/crypto-gnutls.c
branches/vpnc-nortel/tunip.c
trunk/crypto-gnutls.c
trunk/tunip.c

Modified: branches/vpnc-nortel/crypto-gnutls.c
==============================================================================
--- branches/vpnc-nortel/crypto-gnutls.c (original)
+++ branches/vpnc-nortel/crypto-gnutls.c Sun Nov 20 13:38:12 2011
@@ -265,7 +265,7 @@
size_t *out_list_size,
crypto_error **error)
{
- gnutls_x509_crt_t *list = NULL, *old;
+ gnutls_x509_crt_t *list = NULL;
gnutls_datum dt = { NULL, 0 };
size_t fsize = 0;
int err;
@@ -276,7 +276,7 @@
return NULL;

dt.size = (unsigned int) fsize;
- old = list = gnutls_malloc(sizeof(gnutls_x509_crt_t) * num);
+ list = gnutls_malloc(sizeof(gnutls_x509_crt_t) * num);
if (!list) {
crypto_error_set(error, 1, ENOMEM, "not enough memory for CA list");
goto out;

Modified: branches/vpnc-nortel/tunip.c
==============================================================================
--- branches/vpnc-nortel/tunip.c (original)
+++ branches/vpnc-nortel/tunip.c Sun Nov 20 13:38:12 2011
@@ -490,9 +490,7 @@
unsigned char padlen, next_header;
unsigned char *pad;
unsigned char *iv;
- struct esp_encap_header *eh;
-
- eh = (struct esp_encap_header *)(s->ipsec.rx.buf + s->ipsec.rx.bufpayload);
+
s->ipsec.rx.var_header_size = s->ipsec.iv_len;
iv = s->ipsec.rx.buf + s->ipsec.rx.bufpayload + s->ipsec.em->fixed_header_size;


Modified: trunk/crypto-gnutls.c
==============================================================================
--- trunk/crypto-gnutls.c (original)
+++ trunk/crypto-gnutls.c Sun Nov 20 13:38:12 2011
@@ -265,7 +265,7 @@
size_t *out_list_size,
crypto_error **error)
{
- gnutls_x509_crt_t *list = NULL, *old;
+ gnutls_x509_crt_t *list = NULL;
gnutls_datum dt = { NULL, 0 };
size_t fsize = 0;
int err;
@@ -276,7 +276,7 @@
return NULL;

dt.size = (unsigned int) fsize;
- old = list = gnutls_malloc(sizeof(gnutls_x509_crt_t) * num);
+ list = gnutls_malloc(sizeof(gnutls_x509_crt_t) * num);
if (!list) {
crypto_error_set(error, 1, ENOMEM, "not enough memory for CA list");
goto out;

Modified: trunk/tunip.c
==============================================================================
--- trunk/tunip.c (original)
+++ trunk/tunip.c Sun Nov 20 13:38:12 2011
@@ -490,9 +490,7 @@
unsigned char padlen, next_header;
unsigned char *pad;
unsigned char *iv;
- struct esp_encap_header *eh;
-
- eh = (struct esp_encap_header *)(s->ipsec.rx.buf + s->ipsec.rx.bufpayload);
+
s->ipsec.rx.var_header_size = s->ipsec.iv_len;
iv = s->ipsec.rx.buf + s->ipsec.rx.bufpayload + s->ipsec.em->fixed_header_size;


_______________________________________________
vpnc-devel mailing list
vpnc-devel@unix-ag.uni-kl.de
https://lists.unix-ag.uni-kl.de/mailman/listinfo/vpnc-devel
http://www.unix-ag.uni-kl.de/~massar/vpnc/