Commit 9f797b9b authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2726] Reduce scope

parent d0080895
...@@ -56,9 +56,8 @@ PyObject* po_DNSMessageBADVERS; ...@@ -56,9 +56,8 @@ PyObject* po_DNSMessageBADVERS;
int int
readDataFromSequence(uint8_t *data, size_t len, PyObject* sequence) { readDataFromSequence(uint8_t *data, size_t len, PyObject* sequence) {
PyObject* el = NULL;
for (size_t i = 0; i < len; i++) { for (size_t i = 0; i < len; i++) {
el = PySequence_GetItem(sequence, i); PyObject *el = PySequence_GetItem(sequence, i);
if (!el) { if (!el) {
PyErr_SetString(PyExc_TypeError, PyErr_SetString(PyExc_TypeError,
"sequence too short"); "sequence too short");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment