Mercurial > hg > dmlib
comparison src/dmlib.c @ 2414:69a5af2eb1ea
Remove useless dmMemset().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 13 Jan 2020 23:27:01 +0200 |
parents | 3d40a6767a4e |
children | 9807ae37ad69 |
comparison
equal
deleted
inserted
replaced
2413:902cc22018a1 | 2414:69a5af2eb1ea |
---|---|
119 { | 119 { |
120 dmFree(*ptr); | 120 dmFree(*ptr); |
121 *ptr = NULL; | 121 *ptr = NULL; |
122 } | 122 } |
123 } | 123 } |
124 | |
125 | |
126 #ifndef DM_HAVE_MEMSET | |
127 void * dmMemset(void *ptr, const int c, size_t n) | |
128 { | |
129 Uint8 *p = (Uint8 *) ptr; | |
130 | |
131 while (n--) | |
132 *p++ = c; | |
133 | |
134 return ptr; | |
135 } | |
136 #endif | |
137 | 124 |
138 | 125 |
139 BOOL dmGetIntVal(const char *str, unsigned int *value, BOOL *neg) | 126 BOOL dmGetIntVal(const char *str, unsigned int *value, BOOL *neg) |
140 { | 127 { |
141 int ch; | 128 int ch; |