diff options
author | Thomas Heller <theller@ctypes.org> | 2006-03-20 08:28:19 +0000 |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2006-03-20 08:28:19 +0000 |
commit | e2061dc48e1e41611f839a0d2d2afbe7428a95ed (patch) | |
tree | ddabdd08aecd06553aec5de9e2d988bb0cecbba4 | |
parent | cce2267cf117e634e4ff307ca9339075e79bdee9 (diff) | |
download | cpython-git-e2061dc48e1e41611f839a0d2d2afbe7428a95ed.tar.gz |
Fix bug found by Coverty.
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |