From f202d96875d5d66eb8e64a8ed9fd7b0232c7797a Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Wed, 9 Mar 2016 12:04:55 -0800 Subject: [PATCH] Fix bug in obj_decrepit.c Interestingly, Windows caught this with: ..\decrepit\obj\obj_decrepit.c(33) : warning C4090: 'function' : different 'const' qualifiers However, the value of |name| isn't const, only the thing that it points to. So this seems like a bug in MSVC, but I'm ok with it this time. Change-Id: I076f98339cb0b669a4f592fba89aafc0a580efc4 Reviewed-on: https://boringssl-review.googlesource.com/7404 Reviewed-by: David Benjamin --- decrepit/obj/obj_decrepit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/decrepit/obj/obj_decrepit.c b/decrepit/obj/obj_decrepit.c index b1255c7d..a03ea0f1 100644 --- a/decrepit/obj/obj_decrepit.c +++ b/decrepit/obj/obj_decrepit.c @@ -30,7 +30,7 @@ static void cipher_callback(const EVP_CIPHER *cipher, const char *name, const struct wrapped_callback *wrapped = (struct wrapped_callback *)arg; OBJ_NAME obj_name; - memset(&name, 0, sizeof(name)); + memset(&obj_name, 0, sizeof(obj_name)); obj_name.type = OBJ_NAME_TYPE_CIPHER_METH; obj_name.name = name; @@ -42,7 +42,7 @@ static void md_callback(const EVP_MD *md, const char *name, const char *unused, const struct wrapped_callback *wrapped = (struct wrapped_callback*) arg; OBJ_NAME obj_name; - memset(&name, 0, sizeof(name)); + memset(&obj_name, 0, sizeof(obj_name)); obj_name.type = OBJ_NAME_TYPE_MD_METH; obj_name.name = name;