Module Name: src
Committed By: christos
Date: Mon Aug 29 12:46:04 UTC 2011
Modified Files:
src/tests/lib/libcurses/slave: curses_commands.c
Log Message:
fix bug where we read the same argument twice. Name the timeout val the
same 'tval' in both timeout routines.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libcurses/slave/curses_commands.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/lib/libcurses/slave/curses_commands.c
diff -u src/tests/lib/libcurses/slave/curses_commands.c:1.4 src/tests/lib/libcurses/slave/curses_commands.c:1.5
--- src/tests/lib/libcurses/slave/curses_commands.c:1.4 Sat Jun 11 14:03:18 2011
+++ src/tests/lib/libcurses/slave/curses_commands.c Mon Aug 29 08:46:03 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: curses_commands.c,v 1.4 2011/06/11 18:03:18 christos Exp $ */
+/* $NetBSD: curses_commands.c,v 1.5 2011/08/29 12:46:03 christos Exp $ */
/*-
* Copyright 2009 Brett Lymn <[email protected]>
@@ -4088,7 +4088,7 @@
return;
}
- if (sscanf(args[0], "%d", &flag) == 0) {
+ if (sscanf(args[1], "%d", &flag) == 0) {
report_count(1);
report_error("BAD ARGUMENT");
return;
@@ -5620,7 +5620,7 @@
cmd_wtimeout(int nargs, char **args)
{
WINDOW *win;
- int delay;
+ int tval;
if (check_arg_count(nargs, 2) == 1)
return;
@@ -5631,13 +5631,13 @@
return;
}
- if (sscanf(args[1], "%d", &delay) == 0) {
+ if (sscanf(args[1], "%d", &tval) == 0) {
report_count(1);
report_error("BAD ARGUMENT");
return;
}
- wtimeout(win, delay); /* void return */
+ wtimeout(win, tval); /* void return */
report_count(1);
report_return(OK);
}