Set the contents of a memory location to zero.
CS_VOID srv_bzero(locationp, count)
CS_VOID *locationp; CS_INT count;
A non-null pointer to the address of the buffer to be zeroed.
The number of bytes at locationp to set to 0x00.
None.
#include <ospublic.h>
/*
** Local Prototype
*/
CS_RETCODE ex_srv_bzero PROTOTYPE((
CS_VOID *locationp,
CS_INT cnt
))
/*
** EX_SRV_BZERO
** Example routine to set the contents of a section of memory
** to zero using srv_bzero
**
** Arguments:
**
** memp Pointer to section of memory.
** count Number of bytes to set to zero.
**
** Returns
** CS_SUCCEED Arguments were valid and srv_bzero called.
** CS_FAIL An error was detected.
**
*/
CS_RETCODE ex_srv_bzero(memp, count)
CS_VOID *memp;
CS_INT count;
{
/* Check arguments. */
if(memp == (CS_VOID *)NULL)
{
return(CS_FAIL);
}
if(count < 0)
{
return(CS_FAIL);
}
/*
** Set the section of memory to the value 0x00.
*/
(CS_VOID)srv_bzero(memp,count);
return(CS_SUCCEED);
}
srv_bzero sets count bytes to the value 0x00 at memory location locationp.
locationp must be a valid non-null pointer or a memory fault will occur.