]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
kcmp.2: EXAMPLES: Make constant string be 'static const'
authorAlex Colomar <alx.manpages@gmail.com>
Thu, 15 Sep 2022 22:09:59 +0000 (00:09 +0200)
committerAlex Colomar <alx.manpages@gmail.com>
Sat, 17 Sep 2022 11:44:18 +0000 (13:44 +0200)
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
man2/kcmp.2

index d6bfb0908abcbf336cb6bd2c49d09db6c754c670..30e37febc33b5b2cccd390a7e0eaa5a22528f414 100644 (file)
@@ -369,8 +369,8 @@ test_kcmp(char *msg, pid_t pid1, pid_t pid2, int fd_a, int fd_b)
 int
 main(void)
 {
-    int   fd1, fd2, fd3;
-    char  pathname[] = "/tmp/kcmp.test";
+    int                fd1, fd2, fd3;
+    static const char  pathname[] = "/tmp/kcmp.test";
 
     fd1 = open(pathname, O_CREAT | O_RDWR, 0600);
     if (fd1 == \-1)