diff options
| author | Alejandro Colomar <alx.manpages@gmail.com> | 2021-03-08 19:53:25 +0100 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2021-03-14 21:29:13 +0100 |
| commit | e5dc2f3405d91bf4157e4149983cd088bf4bfead (patch) | |
| tree | dd1ce04b2723e247c6b1bab751875ffbdd85ac7f /man3 | |
| parent | 7ecee413233549583526f359c0e047965ff8ef75 (diff) | |
| download | man-pages-e5dc2f3405d91bf4157e4149983cd088bf4bfead.tar.gz | |
random_r.3: SYNOPSIS: Use 'restrict' in prototypes
glibc uses 'restrict' in random_r(), initstate_r(), setstate_r().
Let's use it here too.
.../glibc$ grep_glibc_prototype random_r
stdlib/stdlib.h:434:
extern int random_r (struct random_data *__restrict __buf,
int32_t *__restrict __result) __THROW __nonnull ((1, 2));
.../glibc$ grep_glibc_prototype initstate_r
stdlib/stdlib.h:440:
extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
size_t __statelen,
struct random_data *__restrict __buf)
__THROW __nonnull ((2, 4));
.../glibc$ grep_glibc_prototype setstate_r
stdlib/stdlib.h:445:
extern int setstate_r (char *__restrict __statebuf,
struct random_data *__restrict __buf)
__THROW __nonnull ((1, 2));
.../glibc$
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3')
| -rw-r--r-- | man3/random_r.3 | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/man3/random_r.3 b/man3/random_r.3 index 5363e5e781..882ba83a2b 100644 --- a/man3/random_r.3 +++ b/man3/random_r.3 @@ -31,12 +31,14 @@ random number generator .nf .B #include <stdlib.h> .PP -.BI "int random_r(struct random_data *" buf ", int32_t *" result ); +.BI "int random_r(struct random_data *restrict " buf , +.BI " int32_t *restrict " result ); .BI "int srandom_r(unsigned int " seed ", struct random_data *" buf ); .PP -.BI "int initstate_r(unsigned int " seed ", char *" statebuf , -.BI " size_t " statelen ", struct random_data *" buf ); -.BI "int setstate_r(char *" statebuf ", struct random_data *" buf ); +.BI "int initstate_r(unsigned int " seed ", char *restrict " statebuf , +.BI " size_t " statelen ", struct random_data *restrict " buf ); +.BI "int setstate_r(char *restrict " statebuf , +.BI " struct random_data *restrict " buf ); .fi .PP .RS -4 |
