From: Tim Peters Date: Tue, 30 May 2006 05:23:59 +0000 (+0000) Subject: dict_print(): So that Neal & I don't spend the rest of X-Git-Tag: v2.5b1~340 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=33f4a6a31a940da72db685ec575bee047be77e9a;p=thirdparty%2FPython%2Fcpython.git dict_print(): So that Neal & I don't spend the rest of our lives taking turns rewriting code that works ;-), get rid of casting illusions by declaring a new variable with the obvious type. --- diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 410b9670e4b9..d4cd925b8b82 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -763,11 +763,12 @@ dict_print(register dictobject *mp, register FILE *fp, register int flags) { register Py_ssize_t i; register Py_ssize_t any; + int status; - i = Py_ReprEnter((PyObject*)mp); - if (i != 0) { - if (i < 0) - return (int)i; + status = Py_ReprEnter((PyObject*)mp); + if (status != 0) { + if (status < 0) + return status; fprintf(fp, "{...}"); return 0; }