XINU
Functions
memset.c File Reference

指定のByteブロックに対して、同じ値をNバイト分書き込む。 More...

Go to the source code of this file.

Functions

void * memset (void *s, int c, int n)
 指定のByteブロックに対して、同じ値をNバイト分書き込む。 More...
 

Detailed Description

指定のByteブロックに対して、同じ値をNバイト分書き込む。

Definition in file memset.c.

Function Documentation

◆ memset()

void* memset ( void *  s,
int  c,
int  n 
)

指定のByteブロックに対して、同じ値をNバイト分書き込む。

Parameters
[in,out]sByteブロックへのポインタ(例:文字列)
[in]c書き込む値(1Byte)
[in]n書き込むサイズ(Byte)
Returns
書き込み完了後のByteブロックへのポインタ

Definition at line 13 of file memset.c.

Referenced by arp_alloc(), arp_resolve(), dhcp_bld_bootp_msg(), dnslookup(), ethinit(), ethwrite(), getutime(), if(), lfdballoc(), lflinit(), lfscreate(), lfsinit(), net_init(), rdscontrol(), rdsopen(), rdsprocess(), rflread(), rflwrite(), rfscontrol(), rfsopen(), tftpget_mb(), and xsh_rdstest().

14 {
15  register int i;
16  char *cp = (char *)s;
17 
18  for (i = 0; i < n; i++)
19  {
20  *cp = (unsigned char)c;
21  cp++;
22  }
23  return s;
24 }
Here is the caller graph for this function: