[PATCH v4 2/8] lib: wrap crypt API to hide errno usage

Heiko Schocher hs at denx.de
Thu Jul 8 05:58:05 CEST 2021


Hello Steffen,

On 08.07.21 01:09, Steffen Jaeckel wrote:
> 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 at eyet-services.de>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> ---
> 
> (no changes since v1)
> 
>  include/crypt.h          |  3 ++-
>  lib/crypt/alg-sha256.h   |  6 ------
>  lib/crypt/alg-sha512.h   |  6 ------
>  lib/crypt/crypt-port.h   | 18 ++++++++++--------
>  lib/crypt/crypt-sha256.c | 26 ++++++++++++++++++++++++--
>  lib/crypt/crypt-sha512.c | 26 ++++++++++++++++++++++++--
>  lib/crypt/crypt.c        | 25 ++++++++++++++-----------
>  test/lib/test_crypt.c    | 24 ++++++++++++++++++++++--
>  8 files changed, 96 insertions(+), 38 deletions(-)

Reviewed-by: Heiko Schocher <hs at denx.de>

bye,
Heiko

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de


More information about the U-Boot mailing list