]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
swab.3: SYNOPSIS: Use 'restrict' in prototypes
authorAlejandro Colomar <alx.manpages@gmail.com>
Wed, 10 Mar 2021 18:31:50 +0000 (19:31 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 14 Mar 2021 20:40:45 +0000 (21:40 +0100)
Both POSIX and glibc use 'restrict' in swab().
Let's use it here too.

.../glibc$ grep_glibc_prototype swab
posix/unistd.h:1147:
extern void swab (const void *__restrict __from, void *__restrict __to,
  ssize_t __n) __THROW __nonnull ((1, 2))
    __attr_access ((__read_only__, 1, 3))
    __attr_access ((__write_only__, 2, 3));
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/swab.3

index b68d698d771c12a7adc0e9b848e451c7013ed8cf..700d2d5f4fc678ae225207e6f5d62a515b3da713 100644 (file)
@@ -36,7 +36,8 @@ swab \- swap adjacent bytes
 .BR "#define _XOPEN_SOURCE" "       /* See feature_test_macros(7) */"
 .B #include <unistd.h>
 .PP
-.BI "void swab(const void *" from ", void *" to ", ssize_t " n );
+.BI "void swab(const void *restrict " from ", void *restrict " to \
+", ssize_t " n );
 .fi
 .SH DESCRIPTION
 The