projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
autoupdate
[gnulib.git]
/
lib
/
memxor.c
diff --git
a/lib/memxor.c
b/lib/memxor.c
index
ac922a8
..
826a73c
100644
(file)
--- a/
lib/memxor.c
+++ b/
lib/memxor.c
@@
-1,5
+1,5
@@
/* memxor.c -- perform binary exclusive OR operation of two memory blocks.
/* memxor.c -- perform binary exclusive OR operation of two memory blocks.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005
-2006, 2009-2012
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-12,25
+12,23
@@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Simon Josefsson. The interface was inspired by memxor
in Niels Möller's Nettle. */
/* Written by Simon Josefsson. The interface was inspired by memxor
in Niels Möller's Nettle. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "memxor.h"
void *
memxor (void *restrict dest, const void *restrict src, size_t n)
{
#include "memxor.h"
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 = dest;
for (; n > 0; n--)
- *d++ ^= *s
rc
++;
+ *d++ ^= *s++;
return dest;
}
return dest;
}