From: Thomas Heller Date: Mon, 20 Mar 2006 08:28:19 +0000 (+0000) Subject: Fix bug found by Coverty. X-Git-Tag: v2.5a0~157 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2061dc48e1e41611f839a0d2d2afbe7428a95ed;p=python Fix bug found by Coverty. --- diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 0be8f697ff..fcc8c2a83d 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -2512,7 +2512,7 @@ _get_name(PyObject *obj, char **pname) #endif if (PyString_Check(obj) || PyUnicode_Check(obj)) { *pname = PyString_AsString(obj); - return pname ? 1 : 0; + return *pname ? 1 : 0; } PyErr_SetString(PyExc_TypeError, "function name must be string or integer");