Source-Changes-HG archive

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

[src/trunk]: src/tests/usr.bin/nbperf Pass the correct buffer size.



details:   https://anonhg.NetBSD.org/src/rev/1aeac0dac976
branches:  trunk
changeset: 326598:1aeac0dac976
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Feb 06 14:57:16 2014 +0000

description:
Pass the correct buffer size.

diffstat:

 tests/usr.bin/nbperf/hash_driver.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 9386b5e104cb -r 1aeac0dac976 tests/usr.bin/nbperf/hash_driver.c
--- a/tests/usr.bin/nbperf/hash_driver.c        Thu Feb 06 10:57:12 2014 +0000
+++ b/tests/usr.bin/nbperf/hash_driver.c        Thu Feb 06 14:57:16 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hash_driver.c,v 1.2 2012/09/25 20:53:46 joerg Exp $    */
+/*     $NetBSD: hash_driver.c,v 1.3 2014/02/06 14:57:16 joerg Exp $    */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -43,7 +43,7 @@
        size_t buflen;
        ssize_t len;
 
-       while ((len = getline(&line, &len, stdin)) > 0) {
+       while ((len = getline(&line, &buflen, stdin)) > 0) {
                if (len && line[len - 1] == '\n')
                        --len;
                printf("%" PRId32 "\n", hash(line, len));



Home | Main Index | Thread Index | Old Index