mirror of https://github.com/zrafa/xinu-avr.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
418 B
24 lines
418 B
/* bzero.c - bzero */ |
|
|
|
/*------------------------------------------------------------------------ |
|
* bzero - Clears a block of characters to 0s. |
|
*------------------------------------------------------------------------ |
|
*/ |
|
void bzero( |
|
void *p, |
|
int len |
|
) |
|
{ |
|
int n; |
|
char *pch = (char *)p; |
|
|
|
if ((n = len) <= 0) |
|
{ |
|
return; |
|
} |
|
do |
|
{ |
|
*pch++ = 0; |
|
} |
|
while (--n); |
|
}
|
|
|