* 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 52394048ce0b7e00b9be5c5f0941b528a18114bd..0328348b7e4d051d52d012975ed8f4df122d29da 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 3546011b815d9cd39d634b541d93391b89de4d07..46411d06cda8e88e4615461277343a9025bb95f4 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;
 }