Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs/common Do initialise allocated file system args str...
details: https://anonhg.NetBSD.org/src/rev/424999442b62
branches: trunk
changeset: 761911:424999442b62
user: njoly <njoly%NetBSD.org@localhost>
date: Thu Feb 10 16:35:01 2011 +0000
description:
Do initialise allocated file system args structures for puffs and nfs
(fix some puffs tests failures with MALLOC_OPTIONS=J).
While here, detect and report args allocation failure.
ok from pooka.
diffstat:
tests/fs/common/fstest_nfs.c | 5 ++++-
tests/fs/common/fstest_puffs.c | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r 48f272092700 -r 424999442b62 tests/fs/common/fstest_nfs.c
--- a/tests/fs/common/fstest_nfs.c Thu Feb 10 14:46:44 2011 +0000
+++ b/tests/fs/common/fstest_nfs.c Thu Feb 10 16:35:01 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fstest_nfs.c,v 1.5 2010/12/31 18:11:27 pooka Exp $ */
+/* $NetBSD: fstest_nfs.c,v 1.6 2011/02/10 16:35:01 njoly Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -149,6 +149,9 @@
* the mountpath available here.
*/
args = malloc(sizeof(*args));
+ if (args == NULL)
+ return errno;
+ memset(args, 0, sizeof(*args));
args->ta_childpid = childpid;
strcpy(args->ta_ethername, ethername);
diff -r 48f272092700 -r 424999442b62 tests/fs/common/fstest_puffs.c
--- a/tests/fs/common/fstest_puffs.c Thu Feb 10 14:46:44 2011 +0000
+++ b/tests/fs/common/fstest_puffs.c Thu Feb 10 16:35:01 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fstest_puffs.c,v 1.9 2011/01/07 11:50:37 pooka Exp $ */
+/* $NetBSD: fstest_puffs.c,v 1.10 2011/02/10 16:35:01 njoly Exp $ */
/*
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -260,6 +260,7 @@
args = malloc(sizeof(*args));
if (args == NULL)
return errno;
+ memset(args, 0, sizeof(*args));
pflags = &args->pta_pflags;
Home |
Main Index |
Thread Index |
Old Index