From: Sjoerd Mullender Date: Tue, 2 Nov 1993 15:34:23 +0000 (+0000) Subject: Fixed a couple of bugs: getargs doesn't use % escapes, and seconds X-Git-Tag: v1.0.1~160 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=78ed420314876083b4cc1739d7dbf04e4f012c03;p=thirdparty%2FPython%2Fcpython.git Fixed a couple of bugs: getargs doesn't use % escapes, and seconds must be set after timeout is initialized. --- diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index 77ea61cc16d3..2cae7f44d918 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -125,12 +125,12 @@ select_select(self, args) /* Get args. Looks funny because of optional timeout argument */ if ( getargs(args, "(OOOO)", &ifdlist, &ofdlist, &efdlist, &tout) ) { - seconds = (int)timeout; if (tout == None) tvp = (struct timeval *)0; else { - if (!getargs(tout, "%d;timeout must be float or None", &timeout)) + if (!getargs(tout, "d;timeout must be float or None", &timeout)) return NULL; + seconds = (int)timeout; timeout = timeout - (double)seconds; tv.tv_sec = seconds; tv.tv_usec = (int)(timeout*1000000.0);