4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-18 12:29:32 +08:00
Sebastian Huber d736941a51 Implement bzero() via memset()
Use memset() to implement bzero() to profit from machine-specific
memset() optimizations.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-07-05 13:49:48 +02:00

41 lines
677 B
C

/*
FUNCTION
<<bzero>>---initialize memory to zero
INDEX
bzero
ANSI_SYNOPSIS
#include <strings.h>
void bzero(void *<[b]>, size_t <[length]>);
TRAD_SYNOPSIS
#include <strings.h>
void bzero(<[b]>, <[length]>)
void *<[b]>;
size_t <[length]>;
DESCRIPTION
<<bzero>> initializes <[length]> bytes of memory, starting at address
<[b]>, to zero.
RETURNS
<<bzero>> does not return a result.
PORTABILITY
<<bzero>> is in the Berkeley Software Distribution.
Neither ANSI C nor the System V Interface Definition (Issue 2) require
<<bzero>>.
<<bzero>> requires no supporting OS subroutines.
*/
#include <string.h>
void
bzero(void *b, size_t length)
{
memset(b, 0, length);
}