From: Alejandro Colomar Date: Tue, 3 May 2022 20:32:30 +0000 (+0200) Subject: kcmp.2: EXAMPLES: Use octal permissions instead of S_I* macros X-Git-Tag: man-pages-5.19-rc1~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56fc210e2a0cb0627500f9a0b51f5d8e05631dc0;p=thirdparty%2Fman-pages.git 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 --- 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);