From aed504efdc10b4e8d619e9fbc4639c8b08088cc1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 23 Feb 2019 07:42:08 +0530 Subject: [PATCH] Remove unnecessary NULL check --- kittens/choose/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kittens/choose/main.c b/kittens/choose/main.c index a1b63309a..1db27dd59 100644 --- a/kittens/choose/main.c +++ b/kittens/choose/main.c @@ -205,7 +205,7 @@ match(PyObject *self, PyObject *args) { size_t num_lines = PyList_GET_SIZE(lines); char **clines = malloc(sizeof(char*) * num_lines); size_t *sizes = malloc(sizeof(size_t) * num_lines); - if (!lines || !sizes) { return PyErr_NoMemory(); } + if (!sizes) { return PyErr_NoMemory(); } for (size_t i = 0; i < num_lines; i++) { clines[i] = PyBytes_AS_STRING(PyList_GET_ITEM(lines, i)); sizes[i] = PyBytes_GET_SIZE(PyList_GET_ITEM(lines, i));