On Fri, Jan 10, 2020 at 6:28 AM Commit Bot <[email protected]> wrote:

> From: Waldemar Kozaczuk <[email protected]>
> Committer: Waldemar Kozaczuk <[email protected]>
> Branch: master
>
> glibc: add explicit_bzero() function
>
> Signed-off-by: Waldemar Kozaczuk <[email protected]>
>
> ---
> diff --git a/Makefile b/Makefile
> --- a/Makefile
> +++ b/Makefile
> @@ -1585,6 +1585,7 @@ libc += stdlib/strtod.o
>   libc += stdlib/wcstol.o
>
>   libc += string/__memcpy_chk.o
> +libc += string/explicit_bzero.o
>   libc += string/__explicit_bzero_chk.o
>   musl += string/bcmp.o
>   musl += string/bcopy.o
> diff --git a/libc/string/explicit_bzero.c b/libc/string/explicit_bzero.c
> --- a/libc/string/explicit_bzero.c
> +++ b/libc/string/explicit_bzero.c
> @@ -0,0 +1,8 @@
> +#include <string.h>
> +#include <stdlib.h>
> +
> +void explicit_bzero(void *dest, size_t len)
> +{
> +    memset(dest, 0, len);
> +    return;
> +}
>

Looks good. Two very minor comments (which you can ignore):

1. The return is not needed (it doesn't hurt either, so never mind).
2. explicit_bzero() could have simply been an alias for bzero() since it
does the same thing - instead of repeating the code.

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/CANEVyjuVz4LYyStK2NrD00cdBW5RrChxXgD1iQjc88eeRDH8qA%40mail.gmail.com.

Reply via email to