summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authoroda-gitso <105083118+oda-gitso@users.noreply.github.com>2022-05-25 15:38:47 (GMT)
committerGitHub <noreply@github.com>2022-05-25 15:38:47 (GMT)
commit32e3b790bc588c9ccbea810a4bea7a20bee43fb2 (patch)
tree6025f84e75cf23a1571320cd849937520d4904c0 /Modules
parenta4974003ecdb0aba2385ca6f2af91aa989696cab (diff)
downloadcpython-32e3b790bc588c9ccbea810a4bea7a20bee43fb2.zip
cpython-32e3b790bc588c9ccbea810a4bea7a20bee43fb2.tar.gz
cpython-32e3b790bc588c9ccbea810a4bea7a20bee43fb2.tar.bz2
gh-93172: Remove unnecessary "if"s in binascii_a2b_qp_impl() from Modules/binascii.c (GH-93181)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/binascii.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/Modules/binascii.c b/Modules/binascii.c
index afe4988..ffc2c59 100644
--- a/Modules/binascii.c
+++ b/Modules/binascii.c
@@ -1024,10 +1024,7 @@ binascii_a2b_qp_impl(PyObject *module, Py_buffer *data, int header)
out++;
}
}
- if ((rv = PyBytes_FromStringAndSize((char *)odata, out)) == NULL) {
- PyMem_Free(odata);
- return NULL;
- }
+ rv = PyBytes_FromStringAndSize((char *)odata, out);
PyMem_Free(odata);
return rv;
}
@@ -1232,10 +1229,7 @@ binascii_b2a_qp_impl(PyObject *module, Py_buffer *data, int quotetabs,
}
}
}
- if ((rv = PyBytes_FromStringAndSize((char *)odata, out)) == NULL) {
- PyMem_Free(odata);
- return NULL;
- }
+ rv = PyBytes_FromStringAndSize((char *)odata, out);
PyMem_Free(odata);
return rv;
}