]> granicus.if.org Git - python/commitdiff
Put parentheses around the assignment in the 'while' loop conditional
authorBrett Cannon <bcannon@gmail.com>
Tue, 7 Dec 2004 00:25:35 +0000 (00:25 +0000)
committerBrett Cannon <bcannon@gmail.com>
Tue, 7 Dec 2004 00:25:35 +0000 (00:25 +0000)
expression in min_max() to shut gcc up.

Python/bltinmodule.c

index e189952b49dbee053eb8617acf4598ea72bc0119..33b5ca5e46a32a48963a8c65928aae95638e52b9 100644 (file)
@@ -1139,7 +1139,7 @@ min_max(PyObject *args, PyObject *kwds, int op)
 
        maxitem = NULL; /* the result */
        maxval = NULL;  /* the value associated with the result */
-       while (item = PyIter_Next(it)) {
+       while (( item = PyIter_Next(it) )) {
                /* get the value from the key function */
                if (keyfunc != NULL) {
                        val = PyObject_CallFunctionObjArgs(keyfunc, item, NULL);