summaryrefslogtreecommitdiff
path: root/zap/source/any/mem/fill.c
diff options
context:
space:
mode:
Diffstat (limited to 'zap/source/any/mem/fill.c')
-rw-r--r--zap/source/any/mem/fill.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/zap/source/any/mem/fill.c b/zap/source/any/mem/fill.c
index dc59263..548dfeb 100644
--- a/zap/source/any/mem/fill.c
+++ b/zap/source/any/mem/fill.c
@@ -6,10 +6,8 @@
#include <zap/mem.h>
-void zap_fill(void * const _dest,zap_i8 const _val,zap_sz const _num) {
- zap_i8 * dest;
- zap_i8 * const stop = (zap_i8 *)_dest + _num;
- for (dest = _dest;dest != stop;++dest) {
- *dest = _val;
- }
+void zap_fill(void * const voiddest,unsigned char const val,zap_sz const num) {
+ unsigned char * dest = voiddest;
+ unsigned char * const stop = dest + num;
+ while (dest != stop) *dest++ = val;
}