Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/kernel Fix the error message handling. Thanks to Chri...



details:   https://anonhg.NetBSD.org/src/rev/5551614eebe6
branches:  trunk
changeset: 785057:5551614eebe6
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Wed Feb 20 02:22:48 2013 +0000

description:
Fix the error message handling.  Thanks to Christos for noticing.

diffstat:

 tests/kernel/t_lockf.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 36d517091b12 -r 5551614eebe6 tests/kernel/t_lockf.c
--- a/tests/kernel/t_lockf.c    Wed Feb 20 01:39:02 2013 +0000
+++ b/tests/kernel/t_lockf.c    Wed Feb 20 02:22:48 2013 +0000
@@ -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 @@
        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 @@
                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);



Home | Main Index | Thread Index | Old Index