gnutls-commit
[Top][All Lists]
Advanced

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

[SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-234-gfca326f


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-234-gfca326f
Date: Sat, 19 Jun 2010 08:49:06 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=fca326ff3f480bdcba1b12097336ed508446dc17

The branch, master has been updated
       via  fca326ff3f480bdcba1b12097336ed508446dc17 (commit)
      from  22bded73740de1f53b4053eb7d56b961a7535d3b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fca326ff3f480bdcba1b12097336ed508446dc17
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sat Jun 19 10:18:07 2010 +0200

    Removed the no longer needed "active" variable.

-----------------------------------------------------------------------

Summary of changes:
 lib/gnutls_hash_int.c |   14 ++++----------
 lib/gnutls_hash_int.h |    1 -
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/lib/gnutls_hash_int.c b/lib/gnutls_hash_int.c
index 17affd5..5cf1956 100644
--- a/lib/gnutls_hash_int.c
+++ b/lib/gnutls_hash_int.c
@@ -76,7 +76,6 @@ _gnutls_hash_init (digest_hd_st * dig, 
gnutls_digest_algorithm_t algorithm)
           gnutls_assert ();
           return GNUTLS_E_HASH_FAILED;
         }
-      dig->active = 1;
 
       dig->hash = cc->hash;
       dig->copy = cc->copy;
@@ -98,7 +97,6 @@ _gnutls_hash_init (digest_hd_st * dig, 
gnutls_digest_algorithm_t algorithm)
   dig->output = _gnutls_digest_ops.output;
   dig->deinit = _gnutls_digest_ops.deinit;
 
-  dig->active = 1;
   return 0;
 }
 
@@ -126,7 +124,6 @@ _gnutls_hash_copy (digest_hd_st * dst, digest_hd_st * src)
 
   memset (dst, 0, sizeof (*dst));
   dst->algorithm = src->algorithm;
-  dst->active = 1;
 
   dst->hash = src->hash;
   dst->copy = src->copy;
@@ -154,7 +151,7 @@ _gnutls_hash_output (digest_hd_st * handle, void *digest)
 void
 _gnutls_hash_deinit (digest_hd_st * handle, void *digest)
 {
-  if (handle->active != 1)
+  if (handle->handle == NULL)
     {
       return;
     }
@@ -162,9 +159,8 @@ _gnutls_hash_deinit (digest_hd_st * handle, void *digest)
   if (digest != NULL)
     _gnutls_hash_output (handle, digest);
 
-  handle->active = 0;
-
   handle->deinit (handle->handle);
+  handle->handle = NULL;
 }
 
 int
@@ -262,7 +258,6 @@ _gnutls_hmac_init (digest_hd_st * dig, 
gnutls_mac_algorithm_t algorithm,
       dig->output = cc->output;
       dig->deinit = cc->deinit;
 
-      dig->active = 1;
       return 0;
     }
 
@@ -280,7 +275,6 @@ _gnutls_hmac_init (digest_hd_st * dig, 
gnutls_mac_algorithm_t algorithm,
   dig->output = _gnutls_mac_ops.output;
   dig->deinit = _gnutls_mac_ops.deinit;
 
-  dig->active = 1;
   return 0;
 }
 
@@ -310,7 +304,7 @@ _gnutls_hmac_output (digest_hd_st * handle, void *digest)
 void
 _gnutls_hmac_deinit (digest_hd_st * handle, void *digest)
 {
-  if (handle->active != 1)
+  if (handle->handle == NULL)
     {
       return;
     }
@@ -318,8 +312,8 @@ _gnutls_hmac_deinit (digest_hd_st * handle, void *digest)
   if (digest)
     _gnutls_hmac_output (handle, digest);
 
-  handle->active = 0;
   handle->deinit (handle->handle);
+  handle->handle = NULL;
 }
 
 inline static int
diff --git a/lib/gnutls_hash_int.h b/lib/gnutls_hash_int.h
index ef4e949..f548dfc 100644
--- a/lib/gnutls_hash_int.h
+++ b/lib/gnutls_hash_int.h
@@ -48,7 +48,6 @@ typedef struct
   gnutls_mac_algorithm_t algorithm;
   const void *key;
   int keysize;
-  int active;
   
   hash_func hash;
   copy_func copy;


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]