* memxor.c (memxor): Avoid casts and warnings.
authorSimon Josefsson <simon@josefsson.org>
Thu, 6 Oct 2005 11:19:54 +0000 (11:19 +0000)
committerSimon Josefsson <simon@josefsson.org>
Thu, 6 Oct 2005 11:19:54 +0000 (11:19 +0000)
lib/ChangeLog
lib/memxor.c

index 5239404..0328348 100644 (file)
@@ -1,3 +1,7 @@
+2005-10-06  Simon Josefsson  <jas@extundo.com>
+
+       * memxor.c (memxor): Avoid casts and warnings.
+
 2005-10-05  Derek Price  <derek@ximbiot.com>
 
        * getdelim.c (SIZE_MAX): New macro, if not already defined.
index 3546011..46411d0 100644 (file)
 void *
 memxor (void *restrict dest, const void *restrict src, size_t n)
 {
+  char const *s = src;
   char *d = dest;
 
   for (; n > 0; n--)
-    *(char*)d++ ^= *(char*)src++;
+    *d++ ^= *s++;
 
   return dest;
 }