diff options
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index d2ff07f691..48c3c7abb4 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1871,8 +1871,7 @@ stat_float_times(PyObject* self, PyObject *args) /* Return old value */ return PyBool_FromLong(_stat_float_times); _stat_float_times = newval; - Py_INCREF(Py_None); - return Py_None; + Py_RETURN_NONE; } static PyObject *billion = NULL; @@ -6194,8 +6193,7 @@ posix_initgroups(PyObject *self, PyObject *args) if (res == -1) return PyErr_SetFromErrno(PyExc_OSError); - Py_INCREF(Py_None); - return Py_None; + Py_RETURN_NONE; } #endif /* HAVE_INITGROUPS */ @@ -6258,8 +6256,7 @@ os_setpgrp_impl(PyObject *module) if (setpgrp() < 0) #endif /* SETPGRP_HAVE_ARG */ return posix_error(); - Py_INCREF(Py_None); - return Py_None; + Py_RETURN_NONE; } #endif /* HAVE_SETPGRP */ @@ -6585,8 +6582,7 @@ os_setreuid_impl(PyObject *module, uid_t ruid, uid_t euid) if (setreuid(ruid, euid) < 0) { return posix_error(); } else { - Py_INCREF(Py_None); - return Py_None; + Py_RETURN_NONE; } } #endif /* HAVE_SETREUID */ @@ -6681,8 +6677,7 @@ os_setgroups(PyObject *module, PyObject *groups) if (setgroups(len, grouplist) < 0) return posix_error(); - Py_INCREF(Py_None); - return Py_None; + Py_RETURN_NONE; } #endif /* HAVE_SETGROUPS */ |