XINU
Functions
bzero.c File Reference

Byteブロック領域の先頭N bytesを数値ゼロで埋める。 More...

Go to the source code of this file.

Functions

void bzero (void *p, int len)
 Byteブロック領域の先頭N bytesを数値ゼロで埋める。 More...
 

Detailed Description

Byteブロック領域の先頭N bytesを数値ゼロで埋める。

Definition in file bzero.c.

Function Documentation

◆ bzero()

void bzero ( void *  p,
int  len 
)

Byteブロック領域の先頭N bytesを数値ゼロで埋める。

Parameters
[in,out]pByteブロック(bzero()終了後にゼロで埋まった状態となる)
[in]len数値ゼロ埋めするサイズ(Byte)
Note
引数lenが0以下の場合は、何もせずreturnする。

Definition at line 12 of file bzero.c.

Referenced by newdev(), and newtype().

15 {
16  int n;
17  char *pch = (char *)p;
18 
19  if ((n = len) <= 0)
20  {
21  return;
22  }
23  do
24  {
25  *pch++ = 0;
26  } while (--n);
27 }
Here is the caller graph for this function: