This is an automated email from the git hooks/post-receive script.
nsoffer pushed a commit to branch master in repository sanlock.
commit 304e928430ce3ce77985281cae4fb19905884552 Author: Nir Soffer nsoffer@redhat.com AuthorDate: Sun Jun 16 19:50:44 2019 +0300
python: Use Py_CLEAR
Instead of:
Py_DECREF(obj); obj = NULL;
We can use:
Py_CLEAR(obj);
Signed-off-by: Nir Soffer nsoffer@redhat.com --- python/sanlock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/python/sanlock.c b/python/sanlock.c index e740f89..21a7a76 100644 --- a/python/sanlock.c +++ b/python/sanlock.c @@ -1563,8 +1563,7 @@ py_get_event(PyObject *self __unused, PyObject *args) if (PyList_Append(events, item) != 0) goto exit_fail;
- Py_DECREF(item); - item = NULL; + Py_CLEAR(item); }
return events;
sanlock-devel@lists.fedorahosted.org