From: Andreas Reichel <[email protected]>

Convention for error return values is:

* return `-errno` for all functions accessing environment variables,
  because their return value meaning depend on the parameters.

* return `errno` or `NULL` or `false` for all other functions.

Signed-off-by: Andreas Reichel <[email protected]>
---
 include/ebgenv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/ebgenv.h b/include/ebgenv.h
index 12b778e..46e692c 100644
--- a/include/ebgenv.h
+++ b/include/ebgenv.h
@@ -63,7 +63,7 @@ int ebg_env_open_current(ebgenv_t *e);
  *  @param key an enum constant to specify the variable
  *  @param buffer pointer to buffer containing requested value.
  *         If buffer is NULL, return needed buffer size.
- *  @return If buffer != NULL: 0 on success, errno on failure
+ *  @return If buffer != NULL: 0 on success, -errno on failure
  *          If buffer == NULL: needed buffer size, 0 if variable
  *                             is not found.
  */
@@ -95,7 +95,7 @@ int ebg_env_set_ex(ebgenv_t *e, char *key, uint64_t datatype, 
uint8_t *value,
  *  @param buffer to store the datatype of the value
  *  @param buffer destination for data to be stored into the variable
  *  @param maxlen size of provided buffer
- *  @return 0 on success, errno on failure
+ *  @return 0 on success, -errno on failure
  */
 int ebg_env_get_ex(ebgenv_t *e, char *key, uint64_t *datatype, uint8_t *buffer,
                   uint32_t maxlen);
-- 
2.15.0

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/20171127121430.31448-12-andreas.reichel.ext%40siemens.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to