diff options
| author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-03 22:32:30 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-03 22:32:30 +0200 |
| commit | 56fc210e2a0cb0627500f9a0b51f5d8e05631dc0 (patch) | |
| tree | 2460d7fff411d3ba5d30ca5e0ade01b4c5c0ecd5 | |
| parent | c379c44d33c7198d7126637ca77bf9cb83cab302 (diff) | |
| download | man-pages-56fc210e2a0cb0627500f9a0b51f5d8e05631dc0.tar.gz | |
kcmp.2: EXAMPLES: Use octal permissions instead of S_I* macros
Octal is much more readable.
Reported-by: checkpatch(1)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
| -rw-r--r-- | man2/kcmp.2 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/man2/kcmp.2 b/man2/kcmp.2 index 18efaad2b1..72ca65d3da 100644 --- a/man2/kcmp.2 +++ b/man2/kcmp.2 @@ -374,7 +374,7 @@ main(void) int fd1, fd2, fd3; char pathname[] = "/tmp/kcmp.test"; - fd1 = open(pathname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); + fd1 = open(pathname, O_CREAT | O_RDWR, 0600); if (fd1 == \-1) errExit("open"); @@ -391,7 +391,7 @@ main(void) test_kcmp("Compare duplicate FDs from different processes:", getpid(), getppid(), fd1, fd1); - fd2 = open(pathname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); + fd2 = open(pathname, O_CREAT | O_RDWR, 0600); if (fd2 == \-1) errExit("open"); printf("Child opened file on FD %d\en", fd2); |
