]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
GCM_SET_KEY: Rename macro argument to avoid collision with struct tag.
authorNiels Möller <nisse@lysator.liu.se>
Mon, 24 Nov 2014 20:11:03 +0000 (21:11 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Mon, 24 Nov 2014 20:11:03 +0000 (21:11 +0100)
Spotted by Nikos Mavrogiannopoulos.

ChangeLog
gcm.h

index 57de0f759dfaca8fa2ff5eb3eb876c1e80361da9..44e778f116cfd1595c57412f21d376a9d4a97d63 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-11-24  Niels Möller  <nisse@lysator.liu.se>
 
+       * gcm.h (GCM_SET_KEY): Rename macro argument KEY to avoid
+       collision with a struct tag. Spotted by Nikos Mavrogiannopoulos.
+
        * testsuite/eddsa-verify-test.c (test_eddsa): Fixed test case bug,
        showing up as use of uninitialized data with valgrind.
 
diff --git a/gcm.h b/gcm.h
index f66a0dcdffcb887e014344675add4001f2289a0b..c157f829c970bfecae131c99ef10a322aeeea99b 100644 (file)
--- a/gcm.h
+++ b/gcm.h
@@ -151,9 +151,9 @@ gcm_digest(struct gcm_ctx *ctx, const struct gcm_key *key,
   { struct gcm_key key; struct gcm_ctx gcm; type cipher; }
 
 /* NOTE: Avoid using NULL, as we don't include anything defining it. */
-#define GCM_SET_KEY(ctx, set_key, encrypt, key)                        \
+#define GCM_SET_KEY(ctx, set_key, encrypt, gcm_key)                    \
   do {                                                         \
-    (set_key)(&(ctx)->cipher, (key));                          \
+    (set_key)(&(ctx)->cipher, (gcm_key));                              \
     if (0) (encrypt)(&(ctx)->cipher, 0, (void *)0, (void *)0); \
     gcm_set_key(&(ctx)->key, &(ctx)->cipher,                   \
                (nettle_cipher_func *) (encrypt));              \