8000 gh-93172: Remove unnecessary "if"s in binascii_a2b_qp_impl() from Mod… · python/cpython@32e3b79 · GitHub
[go: up one dir, main page]

Skip to content

Commit 32e3b79

Browse files
author
oda-gitso
authored
gh-93172: Remove unnecessary "if"s in binascii_a2b_qp_impl() from Modules/binascii.c (GH-93181)
1 parent a497400 commit 32e3b79

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Modules/binascii.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,10 +1024,7 @@ binascii_a2b_qp_impl(PyObject *module, Py_buffer *data, int header)
10241024
out++;
10251025
}
10261026
}
1027-
if ((rv = PyBytes_FromStringAndSize((char *)odata, out)) == NULL) {
1028-
PyMem_Free(odata);
1029-
return NULL;
1030-
}
1027+
rv = PyBytes_FromStringAndSize((char *)odata, out);
10311028
PyMem_Free(odata);
10321029
return rv;
10331030
}
@@ -1232,10 +1229,7 @@ binascii_b2a_qp_impl(PyObject *module, Py_buffer *data, int quotetabs,
12321229
}
12331230
}
12341231
}
1235-
if ((rv = PyBytes_FromStringAndSize((char *)odata, out)) == NULL) {
1236-
PyMem_Free(odata);
1237-
return NULL;
1238-
}
1232+
rv = PyBytes_FromStringAndSize((char *)odata, out);
12391233
PyMem_Free(odata);
12401234
return rv;
12411235
}

0 commit comments

Comments
 (0)
0