[Xcb] [PATCH xpyb 05/10] ext.c: Delete explicit comparison with NULL
Tapasweni Pathak
tapaswenipathak at gmail.com
Sun Oct 12 21:49:14 PDT 2014
if (pointer == NULL) is functionally equivalent to
if (!pointer).
Using the second will make it a bit obvious that there is a
pointer involved and not an integer or something.
This patch deletes explicit comaprison with NULL in ext.c file.
Signed-off-by: Tapasweni Pathak <tapaswenipathak at gmail.com>
---
src/ext.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ext.c b/src/ext.c
index 6475850..f693396 100644
--- a/src/ext.c
+++ b/src/ext.c
@@ -108,7 +108,7 @@ xpybExt_send_request(xpybExt *self, PyObject *args, PyObject *kw)
return NULL;
if (!request->is_void)
- if (reply == NULL || !PyType_IsSubtype(reply, &xpybReply_type)) {
+ if (!reply || !PyType_IsSubtype(reply, &xpybReply_type)) {
PyErr_SetString(xpybExcept_base, "Reply type missing or not derived from xcb.Reply.");
return NULL;
}
--
1.7.9.5
More information about the Xcb
mailing list