mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-21 06:36:02 +00:00
Remove unnecessary NULL check
This commit is contained in:
parent
ca38568187
commit
aed504efdc
1 changed files with 1 additions and 1 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue