bits/syscall.h: add landlock syscalls from linux v5.13
[musl.git] / src / string / swab.c
blobace0f4666dd613d58bcf2c93cfd70b37d3f3ae28
1 #include <unistd.h>
3 void swab(const void *restrict _src, void *restrict _dest, ssize_t n)
5 const char *src = _src;
6 char *dest = _dest;
7 for (; n>1; n-=2) {
8 dest[0] = src[1];
9 dest[1] = src[0];
10 dest += 2;
11 src += 2;