diff mbox series

[v2,3/5] secvar/backend: fix comment of get_hash_to_verify

Message ID 20210621082641.26476-4-dja@axtens.net
State Accepted
Headers show
Series secvar cleanups and fixes | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (1cdde9466ab658fb5b5a53af8c4e6a8929eef698)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Daniel Axtens June 21, 2021, 8:26 a.m. UTC
get_hash_to_verify claims to return a negative error code in the
case of error. It actually returns NULL. Fix the comment.

Signed-off-by: Daniel Axtens <dja@axtens.net>
---
 libstb/secvar/backend/edk2-compat-process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nick Child July 20, 2021, 7:29 p.m. UTC | #1
Guess you can't really test a comment... So only:

Reviewed-by: Nick Child <nick.child@ibm.com>

-Nick

On Mon, Jun 21, 2021 at 4:27 AM Daniel Axtens <dja@axtens.net> wrote:
>
> get_hash_to_verify claims to return a negative error code in the
> case of error. It actually returns NULL. Fix the comment.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>
> ---
>  libstb/secvar/backend/edk2-compat-process.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libstb/secvar/backend/edk2-compat-process.c b/libstb/secvar/backend/edk2-compat-process.c
> index b39f35e0c3dc..3ef3cf73c8f7 100644
> --- a/libstb/secvar/backend/edk2-compat-process.c
> +++ b/libstb/secvar/backend/edk2-compat-process.c
> @@ -572,7 +572,7 @@ static int verify_signature(const struct efi_variable_authentication_2 *auth,
>   * Create the hash of the buffer
>   * name || vendor guid || attributes || timestamp || newcontent
>   * which is submitted as signed by the user.
> - * Returns the sha256 hash, else negative error code.
> + * Returns the sha256 hash, else NULL.
>   */
>  static char *get_hash_to_verify(const char *key, const char *new_data,
>                                 const size_t new_data_size,
> --
> 2.30.2
>
> _______________________________________________
> Skiboot mailing list
> Skiboot@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot
diff mbox series

Patch

diff --git a/libstb/secvar/backend/edk2-compat-process.c b/libstb/secvar/backend/edk2-compat-process.c
index b39f35e0c3dc..3ef3cf73c8f7 100644
--- a/libstb/secvar/backend/edk2-compat-process.c
+++ b/libstb/secvar/backend/edk2-compat-process.c
@@ -572,7 +572,7 @@  static int verify_signature(const struct efi_variable_authentication_2 *auth,
  * Create the hash of the buffer
  * name || vendor guid || attributes || timestamp || newcontent
  * which is submitted as signed by the user.
- * Returns the sha256 hash, else negative error code.
+ * Returns the sha256 hash, else NULL.
  */
 static char *get_hash_to_verify(const char *key, const char *new_data,
 				const size_t new_data_size,