diff options
author | Steffen Jaeckel <jaeckel-floss@eyet-services.de> | 2021-07-08 16:57:34 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-07-23 20:36:20 +0300 |
commit | 29bbe71ccfef3440b4881259c6f8e39b6e7924c6 (patch) | |
tree | 94cb413cee26ff74dd02e3b70ca42a378c6d2ae1 /include | |
parent | 26dd9936574864155b989b9f14319ca2779f0598 (diff) | |
download | u-boot-29bbe71ccfef3440b4881259c6f8e39b6e7924c6.tar.xz |
lib: wrap crypt API to hide errno usage
In order to prevent using the global errno, replace it with a static
version and create a wrapper function which returns the error value.
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/crypt.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/crypt.h b/include/crypt.h index e0be2832ff..f18a1705d4 100644 --- a/include/crypt.h +++ b/include/crypt.h @@ -9,5 +9,6 @@ * @equal Pointer to an int where the result is stored * '0' = unequal * '1' = equal + * @return 0 on success, error code of errno else */ -void crypt_compare(const char *should, const char *passphrase, int *equal); +int crypt_compare(const char *should, const char *passphrase, int *equal); |