[Xcb] [PATCH xpyb 09/10] protobj.c: Delete explicit comparison with NULL
Tapasweni Pathak
tapaswenipathak at gmail.com
Sun Oct 12 21:50:31 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 protobj.c file.
Signed-off-by: Tapasweni Pathak <tapaswenipathak at gmail.com>
---
src/protobj.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/protobj.c b/src/protobj.c
index f76f9af..34177d7 100644
--- a/src/protobj.c
+++ b/src/protobj.c
@@ -25,7 +25,7 @@ xpybProtobj_init(xpybProtobj *self, PyObject *args, PyObject *kw)
return -1;
self->buf = PyBuffer_FromObject(parent, offset, size);
- if (self->buf == NULL)
+ if (!self->buf)
return -1;
return 0;
--
1.7.9.5
More information about the Xcb
mailing list