projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add fast path for normal mutexes back to pthread_mutex_lock
[oweals/musl.git]
/
src
/
string
/
swab.c
1
#include <unistd.h>
2
3
void swab(const void *_src, void *_dest, ssize_t n)
4
{
5
const char *src = _src;
6
char *dest = _dest;
7
for (; n>0; n-=2) {
8
dest[0] = src[1];
9
dest[1] = src[0];
10
dest += 2;
11
src += 2;
12
}
13
}