Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libc/sys Don't pass uninitialized variables by value.



details:   https://anonhg.NetBSD.org/src/rev/9b69736c7d05
branches:  trunk
changeset: 808878:9b69736c7d05
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Jun 06 13:14:06 2015 +0000

description:
Don't pass uninitialized variables by value.

diffstat:

 tests/lib/libc/sys/t_sigqueue.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r aff359d514e1 -r 9b69736c7d05 tests/lib/libc/sys/t_sigqueue.c
--- a/tests/lib/libc/sys/t_sigqueue.c   Sat Jun 06 13:08:31 2015 +0000
+++ b/tests/lib/libc/sys/t_sigqueue.c   Sat Jun 06 13:14:06 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sigqueue.c,v 1.4 2011/07/07 16:31:11 jruoho Exp $ */
+/* $NetBSD: t_sigqueue.c,v 1.5 2015/06/06 13:14:06 joerg Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_sigqueue.c,v 1.4 2011/07/07 16:31:11 jruoho Exp $");
+__RCSID("$NetBSD: t_sigqueue.c,v 1.5 2015/06/06 13:14:06 joerg Exp $");
 
 
 #include <atf-c.h>
@@ -87,7 +87,7 @@
 
 ATF_TC_BODY(sigqueue_err, tc)
 {
-       union sigval sv;
+       static union sigval sv;
 
        errno = 0;
        ATF_REQUIRE_ERRNO(EINVAL, sigqueue(getpid(), -1, sv) == -1);



Home | Main Index | Thread Index | Old Index