From: Alex Colomar Date: Thu, 15 Sep 2022 22:09:59 +0000 (+0200) Subject: kcmp.2: EXAMPLES: Make constant string be 'static const' X-Git-Tag: man-pages-6.00~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c396c898cbfe51ccfb486d48a8abd2fc5c43ebb7;p=thirdparty%2Fman-pages.git kcmp.2: EXAMPLES: Make constant string be 'static const' Signed-off-by: Alex Colomar --- diff --git a/man2/kcmp.2 b/man2/kcmp.2 index d6bfb0908a..30e37febc3 100644 --- a/man2/kcmp.2 +++ b/man2/kcmp.2 @@ -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)