Adding upstream version 3.50~pre5.
[syslinux-debian/hramrach.git] / com32 / lib / memswap.c
blob97fa51974522c5b71adcd7c1fbbcf8688fe659b0
1 /*
2 * memswap()
4 * Swaps the contents of two nonoverlapping memory areas.
5 * This really could be done faster...
6 */
8 #include <string.h>
10 void memswap(void *m1, void *m2, size_t n)
12 char *p = m1;
13 char *q = m2;
14 char tmp;
16 while ( n-- ) {
17 tmp = *p;
18 *p = *q;
19 *q = tmp;
21 p++; q++;