/* Yes, Virginia, it had better be unsigned */
unsigned char c1, c2;
- c1 = 0; c2 = 0;
+ c1 = c2 = 0;
if (len) {
do {
c1 = *s1;
dest++;
while ((*dest++ = *src++) != '\0')
;
-
return tmp;
}
EXPORT_SYMBOL(strcat);
*/
void *memset(void *s, int c, size_t count)
{
- char *xs = (char *)s;
+ char *xs = s;
while (count--)
*xs++ = c;
*/
void *memcpy(void *dest, const void *src, size_t count)
{
- char *tmp = (char *)dest;
- char *s = (char *)src;
+ char *tmp = dest;
+ char *s = src;
while (count--)
*tmp++ = *s++;
char *tmp, *s;
if (dest <= src) {
- tmp = (char *)dest;
- s = (char *)src;
+ tmp = dest;
+ s = src;
while (count--)
*tmp++ = *s++;
} else {
- tmp = (char *)dest + count;
- s = (char *)src + count;
+ tmp = dest;
+ tmp += count;
+ s = src;
+ s += count;
while (count--)
*--tmp = *--s;
}
*/
void *memscan(void *addr, int c, size_t size)
{
- unsigned char *p = (unsigned char *)addr;
+ unsigned char *p = addr;
while (size) {
if (*p == c)