From 727f93f8ea3dc467694d541d28ba4f1ed0e0a671 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 7 Nov 2014 14:09:41 -0500 Subject: [PATCH] make efi_guid_t's const. Signed-off-by: Peter Jones --- src/cms_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cms_common.c b/src/cms_common.c index a360961..7e032c8 100644 --- a/src/cms_common.c +++ b/src/cms_common.c @@ -45,7 +45,7 @@ struct digest_param { SECOidTag digest_tag; SECOidTag signature_tag; SECOidTag digest_encryption_tag; - efi_guid_t *efi_guid; + const efi_guid_t *efi_guid; int size; }; -- 2.1.4 From ac9de615112114e222527b2eabc9b7f2642f01fe Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 26 May 2015 09:42:32 -0400 Subject: [PATCH] Propogate some "const" declarations better. Signed-off-by: Peter Jones --- src/efisiglist.c | 2 +- src/siglist.c | 8 ++++---- src/siglist.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/efisiglist.c b/src/efisiglist.c index aedfc4c..a078640 100644 --- a/src/efisiglist.c +++ b/src/efisiglist.c @@ -32,7 +32,7 @@ struct hash_param { char *name; - efi_guid_t *guid; + const efi_guid_t *guid; int size; }; diff --git a/src/siglist.c b/src/siglist.c index 38a9a2a..a7154aa 100644 --- a/src/siglist.c +++ b/src/siglist.c @@ -51,7 +51,7 @@ struct efi_signature_list { }; struct signature_list { - efi_guid_t *SignatureType; + const efi_guid_t *SignatureType; uint32_t SignatureListSize; uint32_t SignatureHeaderSize; uint32_t SignatureSize; @@ -60,7 +60,7 @@ struct signature_list { }; struct sig_type { - efi_guid_t *type; + const efi_guid_t *type; uint32_t size; }; @@ -78,7 +78,7 @@ static struct sig_type sig_types[] = { static int num_sig_types = sizeof (sig_types) / sizeof (struct sig_type); static int32_t -get_sig_type_size(efi_guid_t *sig_type) +get_sig_type_size(const efi_guid_t *sig_type) { for (int i = 0; i < num_sig_types; i++) { if (!memcmp(sig_type, sig_types[i].type, sizeof (*sig_type))) @@ -88,7 +88,7 @@ get_sig_type_size(efi_guid_t *sig_type) } signature_list * -signature_list_new(efi_guid_t *SignatureType) +signature_list_new(const efi_guid_t *SignatureType) { int32_t size = get_sig_type_size(SignatureType); if (size < 0) diff --git a/src/siglist.h b/src/siglist.h index e789264..2b72a27 100644 --- a/src/siglist.h +++ b/src/siglist.h @@ -21,7 +21,7 @@ typedef struct signature_list signature_list; -extern signature_list *signature_list_new(efi_guid_t *SignatureType); +extern signature_list *signature_list_new(const efi_guid_t *SignatureType); extern int signature_list_add_sig(signature_list *sl, efi_guid_t owner, uint8_t *sig, uint32_t sigsize); extern int signature_list_realize(signature_list *sl, -- 2.1.4