[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
nits in gc, md4, and rijndael
From: |
Ralf Wildenhues |
Subject: |
nits in gc, md4, and rijndael |
Date: |
Fri, 22 Sep 2006 06:27:26 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hello Simon,
OK to apply this patch? The changes allow
gcc -g -O2 -Wall -Werror -fno-builtin
to compile these files (on GNU/Linux).
Cheers,
Ralf
* gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
* md4.c (md4_process_block): Remove unused variable.
* rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
parentheses for clarity.
Index: lib/gc-gnulib.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/gc-gnulib.c,v
retrieving revision 1.18
diff -u -r1.18 gc-gnulib.c
--- lib/gc-gnulib.c 8 Mar 2006 13:40:31 -0000 1.18
+++ lib/gc-gnulib.c 22 Sep 2006 03:50:59 -0000
@@ -52,7 +52,7 @@
#ifdef GC_USE_SHA1
# include "sha1.h"
#endif
-#ifdef GC_USE_HMAC_MD5
+#if defined(GC_USE_HMAC_MD5) || defined(GC_USE_HMAC_SHA1)
# include "hmac.h"
#endif
Index: lib/md4.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/md4.c,v
retrieving revision 1.6
diff -u -r1.6 md4.c
--- lib/md4.c 11 May 2006 07:33:27 -0000 1.6
+++ lib/md4.c 22 Sep 2006 03:50:59 -0000
@@ -311,7 +311,6 @@
the loop. */
while (words < endp)
{
- uint32_t tm;
int t;
for (t = 0; t < 16; t++)
{
Index: lib/rijndael-api-fst.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/rijndael-api-fst.c,v
retrieving revision 1.2
diff -u -r1.2 rijndael-api-fst.c
--- lib/rijndael-api-fst.c 21 Oct 2005 13:45:23 -0000 1.2
+++ lib/rijndael-api-fst.c 22 Sep 2006 03:50:59 -0000
@@ -361,10 +361,10 @@
size_t i, k, t, numBlocks;
char block[16], *iv;
- if (cipher == NULL ||
- key == NULL ||
- cipher->mode != RIJNDAEL_MODE_CFB1
- && key->direction == RIJNDAEL_DIR_ENCRYPT)
+ if (cipher == NULL
+ || key == NULL
+ || (cipher->mode != RIJNDAEL_MODE_CFB1
+ && key->direction == RIJNDAEL_DIR_ENCRYPT))
{
return RIJNDAEL_BAD_CIPHER_STATE;
}
- nits in gc, md4, and rijndael,
Ralf Wildenhues <=