BZERO(3)

NAME
bzero, explicit_bzero - write zeroes to a byte string

SYNOPSIS
#include <string.h>
void
bzero(void *b, size_t len);
void
explicit_bzero(void *b, size_t len);

DESCRIPTION
The bzero() function writes len zero bytes to the string b. If len is zero, bzero() does nothing.

The explicit_bzero() variant behaves the same, but will not be removed by a compiler's dead store optimization pass, making it useful for clearing sensitive memory such as a password.

SEE ALSO
memset(3), swab(3)

HISTORY
The bzero() function first appeared in 4.2BSD. The explicit_bzero() function first appeared in OpenBSD 5.5.