Module Name:    src
Committed By:   njoly
Date:           Thu Feb 10 16:35:01 UTC 2011

Modified Files:
        src/tests/fs/common: fstest_nfs.c fstest_puffs.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/fs/common/fstest_nfs.c
cvs rdiff -u -r1.9 -r1.10 src/tests/fs/common/fstest_puffs.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/fs/common/fstest_nfs.c
diff -u src/tests/fs/common/fstest_nfs.c:1.5 src/tests/fs/common/fstest_nfs.c:1.6
--- src/tests/fs/common/fstest_nfs.c:1.5	Fri Dec 31 18:11:27 2010
+++ src/tests/fs/common/fstest_nfs.c	Thu Feb 10 16:35:01 2011
@@ -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);
 

Index: src/tests/fs/common/fstest_puffs.c
diff -u src/tests/fs/common/fstest_puffs.c:1.9 src/tests/fs/common/fstest_puffs.c:1.10
--- src/tests/fs/common/fstest_puffs.c:1.9	Fri Jan  7 11:50:37 2011
+++ src/tests/fs/common/fstest_puffs.c	Thu Feb 10 16:35:01 2011
@@ -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;
 

Reply via email to