From: Simon Josefsson Date: Thu, 6 Oct 2005 11:19:54 +0000 (+0000) Subject: * memxor.c (memxor): Avoid casts and warnings. X-Git-Tag: cvs-readonly~2843 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=e63023ef37a1810d614daeaafbdf36c9c0ae2d4c;p=gnulib.git * memxor.c (memxor): Avoid casts and warnings. --- diff --git a/lib/ChangeLog b/lib/ChangeLog index 52394048c..0328348b7 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2005-10-06 Simon Josefsson + + * memxor.c (memxor): Avoid casts and warnings. + 2005-10-05 Derek Price * getdelim.c (SIZE_MAX): New macro, if not already defined. diff --git a/lib/memxor.c b/lib/memxor.c index 3546011b8..46411d06c 100644 --- a/lib/memxor.c +++ b/lib/memxor.c @@ -27,10 +27,11 @@ 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; }