Message ID | 20210922103208.178578-1-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | uefi: securebootcert: make some function arguments const | expand |
On 2021-09-22 4:32 a.m., Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > A couple of function arguments can be consified, cleans up > cppcheck style warnings. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/uefi/securebootcert/securebootcert.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/uefi/securebootcert/securebootcert.c b/src/uefi/securebootcert/securebootcert.c > index 7a0366ea..39ff1ebb 100644 > --- a/src/uefi/securebootcert/securebootcert.c > +++ b/src/uefi/securebootcert/securebootcert.c > @@ -263,7 +263,11 @@ static inline bool check_addr_overflow( > return (len > ~(uintptr_t)0 - (uintptr_t)var_data_addr); > } > > -static bool check_sigdb_presence(uint8_t *var_data, size_t datalen, uint8_t *key, uint32_t key_len) > +static bool check_sigdb_presence( > + uint8_t *var_data, > + const size_t datalen, > + const uint8_t *key, > + const uint32_t key_len) > { > uint8_t *var_data_addr; > EFI_SIGNATURE_LIST siglist; > Acked-by: Alex Hung <alex.hung@canonical.com>
On 9/22/21 6:32 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > A couple of function arguments can be consified, cleans up > cppcheck style warnings. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/uefi/securebootcert/securebootcert.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/uefi/securebootcert/securebootcert.c b/src/uefi/securebootcert/securebootcert.c > index 7a0366ea..39ff1ebb 100644 > --- a/src/uefi/securebootcert/securebootcert.c > +++ b/src/uefi/securebootcert/securebootcert.c > @@ -263,7 +263,11 @@ static inline bool check_addr_overflow( > return (len > ~(uintptr_t)0 - (uintptr_t)var_data_addr); > } > > -static bool check_sigdb_presence(uint8_t *var_data, size_t datalen, uint8_t *key, uint32_t key_len) > +static bool check_sigdb_presence( > + uint8_t *var_data, > + const size_t datalen, > + const uint8_t *key, > + const uint32_t key_len) > { > uint8_t *var_data_addr; > EFI_SIGNATURE_LIST siglist; > Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/uefi/securebootcert/securebootcert.c b/src/uefi/securebootcert/securebootcert.c index 7a0366ea..39ff1ebb 100644 --- a/src/uefi/securebootcert/securebootcert.c +++ b/src/uefi/securebootcert/securebootcert.c @@ -263,7 +263,11 @@ static inline bool check_addr_overflow( return (len > ~(uintptr_t)0 - (uintptr_t)var_data_addr); } -static bool check_sigdb_presence(uint8_t *var_data, size_t datalen, uint8_t *key, uint32_t key_len) +static bool check_sigdb_presence( + uint8_t *var_data, + const size_t datalen, + const uint8_t *key, + const uint32_t key_len) { uint8_t *var_data_addr; EFI_SIGNATURE_LIST siglist;