Source-Changes-HG archive

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

[src/trunk]: src/tests/fs/tmpfs Fix off by one that made most of these tests ...



details:   https://anonhg.NetBSD.org/src/rev/5ce09e9a9b40
branches:  trunk
changeset: 760882:5ce09e9a9b40
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Jan 15 20:16:57 2011 +0000

description:
Fix off by one that made most of these tests die with a bus error in the
sparc64 runs.

diffstat:

 tests/fs/tmpfs/h_tools.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r e3e5acc4001c -r 5ce09e9a9b40 tests/fs/tmpfs/h_tools.c
--- a/tests/fs/tmpfs/h_tools.c  Sat Jan 15 16:13:59 2011 +0000
+++ b/tests/fs/tmpfs/h_tools.c  Sat Jan 15 20:16:57 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: h_tools.c,v 1.2 2008/04/28 20:24:12 martin Exp $       */
+/*     $NetBSD: h_tools.c,v 1.3 2011/01/15 20:16:57 martin Exp $       */
 
 /*
  * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
        argc--;
        argv++;
 
-       changes = malloc(sizeof(struct kevent) * (argc - 1));
+       changes = malloc(sizeof(struct kevent) * argc);
        if (changes == NULL)
                errx(EXIT_FAILURE, "not enough memory");
 



Home | Main Index | Thread Index | Old Index