summaryrefslogtreecommitdiffstats
path: root/src/if_python3.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-03-30 18:47:01 +0100
committerBram Moolenaar <Bram@vim.org>2019-03-30 18:47:01 +0100
commitabab0b0fdd6535969447b03a4fffc1947918cf6c (patch)
tree2d43537a5dce8433ef2b2a37684c9e069392c592 /src/if_python3.c
parentbd9bf266fccbf7b7f09e476e09b61f0133e914db (diff)
patch 8.1.1086: too many curly bracesv8.1.1086
Problem: Too many curly braces. Solution: Remove curly braces where they are not needed. (Hirohito Higashi, closes #3982)
Diffstat (limited to 'src/if_python3.c')
-rw-r--r--src/if_python3.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/if_python3.c b/src/if_python3.c
index e8ab44f3be..d93d633186 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -1236,9 +1236,7 @@ BufferSubscript(PyObject *self, PyObject* idx)
(Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
&start, &stop,
&step, &slicelen) < 0)
- {
return NULL;
- }
return BufferSlice((BufferObject *)(self), start, stop);
}
else
@@ -1268,9 +1266,7 @@ BufferAsSubscript(PyObject *self, PyObject* idx, PyObject* val)
(Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
&start, &stop,
&step, &slicelen) < 0)
- {
return -1;
- }
return RBAsSlice((BufferObject *)(self), start, stop, val, 1,
(PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count,
NULL);
@@ -1352,9 +1348,7 @@ RangeSubscript(PyObject *self, PyObject* idx)
((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
&start, &stop,
&step, &slicelen) < 0)
- {
return NULL;
- }
return RangeSlice((RangeObject *)(self), start, stop);
}
else
@@ -1371,7 +1365,8 @@ RangeAsSubscript(PyObject *self, PyObject *idx, PyObject *val)
{
long n = PyLong_AsLong(idx);
return RangeAsItem(self, n, val);
- } else if (PySlice_Check(idx))
+ }
+ else if (PySlice_Check(idx))
{
Py_ssize_t start, stop, step, slicelen;
@@ -1379,9 +1374,7 @@ RangeAsSubscript(PyObject *self, PyObject *idx, PyObject *val)
((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
&start, &stop,
&step, &slicelen) < 0)
- {
return -1;
- }
return RangeAsSlice(self, start, stop, val);
}
else