Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs/nfs/nfsservice CID 975238: Unchecked returns
details: https://anonhg.NetBSD.org/src/rev/5550441c0d0c
branches: trunk
changeset: 329162:5550441c0d0c
user: christos <christos%NetBSD.org@localhost>
date: Mon May 12 15:31:07 2014 +0000
description:
CID 975238: Unchecked returns
diffstat:
tests/fs/nfs/nfsservice/rumpnfsd.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (23 lines):
diff -r 86c43f6c8e10 -r 5550441c0d0c tests/fs/nfs/nfsservice/rumpnfsd.c
--- a/tests/fs/nfs/nfsservice/rumpnfsd.c Mon May 12 15:27:36 2014 +0000
+++ b/tests/fs/nfs/nfsservice/rumpnfsd.c Mon May 12 15:31:07 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpnfsd.c,v 1.7 2011/02/28 21:21:14 pooka Exp $ */
+/* $NetBSD: rumpnfsd.c,v 1.8 2014/05/12 15:31:07 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -95,9 +95,10 @@
}
/* mini-mtree for mountd */
- rump_sys_mkdir("/var", 0777);
- rump_sys_mkdir("/var/run", 0777);
- rump_sys_mkdir("/var/db", 0777);
+ static const char *const dirs[] = { "/var", "/var/run", "/var/db" };
+ for (size_t i = 0; i < __arraycount(dirs); i++)
+ if (rump_sys_mkdir(dirs[i], 0777) == -1)
+ err(1, "can't mkdir `%s'", dirs[i]);
if (ffs_fstest_newfs(NULL, &fsarg,
imagename, FSTEST_IMGSIZE, NULL) != 0)
Home |
Main Index |
Thread Index |
Old Index