diff options
author | cgohlke <cgohlke@uci.edu> | 2019-01-25 17:31:53 -0800 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2019-02-02 22:26:21 +0100 |
commit | 01eda6143fc61a77b7ea0737cb3de864997344cc (patch) | |
tree | bd407db5e1a376294b801326e5fa66b616924239 | |
parent | e8623d15c855b9c704f0421f9643cea75c8f8484 (diff) | |
download | cython-01eda6143fc61a77b7ea0737cb3de864997344cc.tar.gz |
Remove superfluous code
Pointer buf cannot be NULL
-rw-r--r-- | Cython/Utility/MemoryView_C.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Cython/Utility/MemoryView_C.c b/Cython/Utility/MemoryView_C.c index 62fb37c6b..2419bc04b 100644 --- a/Cython/Utility/MemoryView_C.c +++ b/Cython/Utility/MemoryView_C.c @@ -394,11 +394,7 @@ __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview, Py_buffer *buf = &memview->view; __Pyx_RefNannySetupContext("init_memviewslice", 0); - if (!buf) { - PyErr_SetString(PyExc_ValueError, - "buf is NULL."); - goto fail; - } else if (memviewslice->memview || memviewslice->data) { + if (memviewslice->memview || memviewslice->data) { PyErr_SetString(PyExc_ValueError, "memviewslice is already initialized!"); goto fail; |