Source-Changes-HG archive

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

[src/trunk]: src/tests/syscall Remove redundant memset(3) calls.



details:   https://anonhg.NetBSD.org/src/rev/6a53fd0c6387
branches:  trunk
changeset: 763871:6a53fd0c6387
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Wed Apr 06 03:47:14 2011 +0000

description:
Remove redundant memset(3) calls.

diffstat:

 tests/syscall/t_setrlimit.c |  8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diffs (36 lines):

diff -r 5f0206832bb5 -r 6a53fd0c6387 tests/syscall/t_setrlimit.c
--- a/tests/syscall/t_setrlimit.c       Wed Apr 06 01:49:23 2011 +0000
+++ b/tests/syscall/t_setrlimit.c       Wed Apr 06 03:47:14 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_setrlimit.c,v 1.2 2011/04/05 19:06:09 jruoho Exp $ */
+/* $NetBSD: t_setrlimit.c,v 1.3 2011/04/06 03:47:14 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_setrlimit.c,v 1.2 2011/04/05 19:06:09 jruoho Exp $");
+__RCSID("$NetBSD: t_setrlimit.c,v 1.3 2011/04/06 03:47:14 jruoho Exp $");
 
 #include <sys/resource.h>
 #include <sys/mman.h>
@@ -187,8 +187,6 @@
 
        if (pid == 0) {
 
-               (void)memset(&res, 0, sizeof(struct rlimit));
-
                res.rlim_cur = 2;
                res.rlim_max = 2;
 
@@ -416,8 +414,6 @@
                /*
                 * Set RLIMIT_NPROC to zero and try to fork.
                 */
-               (void)memset(&res, 0, sizeof(struct rlimit));
-
                res.rlim_cur = 0;
                res.rlim_max = 0;
 



Home | Main Index | Thread Index | Old Index