From 228b12edcce49649d6befa3c03dbcefd5a22ae76 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 23 Jan 2017 09:47:21 +0200 Subject: Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever possible. Patch is writen with Coccinelle. --- Python/modsupport.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Python/modsupport.c') diff --git a/Python/modsupport.c b/Python/modsupport.c index 01b5dc9dda..e9e025bdb2 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -514,8 +514,7 @@ va_build_value(const char *format, va_list va, int flags) if (n < 0) return NULL; if (n == 0) { - Py_INCREF(Py_None); - return Py_None; + Py_RETURN_NONE; } va_copy(lva, va); if (n == 1) { -- cgit v1.2.1