Module Name: src
Committed By: joerg
Date: Thu Feb 6 14:57:17 UTC 2014
Modified Files:
src/tests/usr.bin/nbperf: hash_driver.c
Log Message:
Pass the correct buffer size.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/nbperf/hash_driver.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/usr.bin/nbperf/hash_driver.c
diff -u src/tests/usr.bin/nbperf/hash_driver.c:1.2 src/tests/usr.bin/nbperf/hash_driver.c:1.3
--- src/tests/usr.bin/nbperf/hash_driver.c:1.2 Tue Sep 25 20:53:46 2012
+++ src/tests/usr.bin/nbperf/hash_driver.c Thu Feb 6 14:57:16 2014
@@ -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 @@ main(void)
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));