Module Name: src Committed By: pgoyette Date: Wed Feb 20 02:22:48 UTC 2013
Modified Files: src/tests/kernel: t_lockf.c Log Message: Fix the error message handling. Thanks to Christos for noticing. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/kernel/t_lockf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/kernel/t_lockf.c diff -u src/tests/kernel/t_lockf.c:1.7 src/tests/kernel/t_lockf.c:1.8 --- src/tests/kernel/t_lockf.c:1.7 Tue Feb 19 22:44:27 2013 +++ src/tests/kernel/t_lockf.c Wed Feb 20 02:22:48 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: t_lockf.c,v 1.7 2013/02/19 22:44:27 pgoyette Exp $ */ +/* $NetBSD: t_lockf.c,v 1.8 2013/02/20 02:22:48 pgoyette Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -123,7 +123,7 @@ ATF_TC_BODY(randlock, tc) pid_t *pid; int status; char pipe_in, pipe_out; - const char *pipe_errmsg = "child: pipe write failed\n"; + const char pipe_errmsg[] = "child: pipe write failed\n"; (void)unlink(lockfile); @@ -147,7 +147,7 @@ ATF_TC_BODY(randlock, tc) case 0: if (write(pipe_fd[1], &pipe_out, 1) != 1) write(STDERR_FILENO, pipe_errmsg, - __arraycount(pipe_errmsg)); + __arraycount(pipe_errmsg) - 1); else trylocks(i); _exit(0);