bzero(3C) DG/UX R4.11MU05 bzero(3C)
NAME
bzero - zero a portion of memory
SYNOPSIS
#include <string.h>
void bzero(void* ptr, sizet length);
where:
ptr A pointer to the area to clear
length The number of bytes set to zero
DESCRIPTION
The bzero function fills a specified memory area with zeros. The
size of the area of memory is equal to length.
This function comes from the University of California Berkeley UNIX
(BSD) system.
Considerations for Threads Programming
+---------+-----------------------------+
| | async- |
|function | reentrant cancel cancel |
| | point safe |
+---------+-----------------------------+
|bzero | Y N N |
+---------+-----------------------------+
RETURNS
The bzero function returns no value.
EXAMPLE
/* Program test for the bzero() function */
#include <stdio.h>
#include <string.h>
char buf[80] = "abcdef";
main() {
printf("buf = '%s'\n", buf);
bzero(buf, sizeof(buf));
printf("buf = '%s'\n", buf);
return 0;
}
A call to this program generates the output
buf = 'abcdef'
buf = ''
SEE ALSO
reentrant(3), memory(3C).
Licensed material--property of copyright holder(s)