]> git.ipfire.org Git - thirdparty/gcc.git/blame - libiberty/bzero.c
vsnprintf.c (vsnprintf): Don't pad string with extra nulls.
[thirdparty/gcc.git] / libiberty / bzero.c
CommitLineData
6599da04
JM
1/* Portable version of bzero for systems without it.
2 This function is in the public domain. */
3
4/*
6599da04 5
aaa5f039 6@deftypefn Supplemental void bzero (char *@var{mem}, int @var{count})
6599da04 7
aaa5f039
DD
8Zeros @var{count} bytes starting at @var{mem}. Use of this function
9is deprecated in favor of @code{memset}.
6599da04 10
aaa5f039 11@end deftypefn
6599da04
JM
12
13*/
14
15
16void
17bzero (to, count)
18 char *to;
19 int count;
20{
21 while (count-- > 0)
22 {
23 *to++ = 0;
24 }
25}