diff options
author | huderlem <huderlem@gmail.com> | 2020-02-15 09:06:38 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-15 09:06:38 -0600 |
commit | 74e171579e0bbefbd72b83f3764fe504464bbdbe (patch) | |
tree | 8db5aacbe963fef56eb2d9965fc87db1a6642387 /libiberty/bzero.c | |
parent | 27176890c4a688ea7de44d3f55af32827016a9fd (diff) | |
parent | c6bcd24dfe44d58ed1b6bef6653270dbf6cd6bfa (diff) |
Merge pull request #30 from camthesaxman/arm_support
Build ARM compiler
Diffstat (limited to 'libiberty/bzero.c')
-rwxr-xr-x | libiberty/bzero.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/libiberty/bzero.c b/libiberty/bzero.c new file mode 100755 index 0000000..d01644b --- /dev/null +++ b/libiberty/bzero.c @@ -0,0 +1,31 @@ +/* Portable version of bzero for systems without it. + This function is in the public domain. */ + +/* +NAME + bzero -- zero the contents of a specified memory region + +SYNOPSIS + void bzero (char *to, int count) + +DESCRIPTION + Zero COUNT bytes of memory pointed to by TO. + +BUGS + Significant speed enhancements may be made in some environments + by zeroing more than a single byte at a time, or by unrolling the + loop. + +*/ + + +void +bzero (to, count) + char *to; + int count; +{ + while (count-- > 0) + { + *to++ = 0; + } +} |