From e2061dc48e1e41611f839a0d2d2afbe7428a95ed Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Mon, 20 Mar 2006 08:28:19 +0000 Subject: [PATCH] Fix bug found by Coverty. --- Modules/_ctypes/_ctypes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- 2.40.0