Remove dead code from tracemalloc (GH-21029)
tracemalloc_get_frame() checked filename == NULL two times in a row.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 9cfcdb7d6e
)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
1a0c581a94
commit
9191eacf9e
|
@ -319,10 +319,6 @@ tracemalloc_get_frame(PyFrameObject *pyframe, frame_t *frame)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(filename != NULL);
|
|
||||||
if (filename == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!PyUnicode_Check(filename)) {
|
if (!PyUnicode_Check(filename)) {
|
||||||
#ifdef TRACE_DEBUG
|
#ifdef TRACE_DEBUG
|
||||||
tracemalloc_error("filename is not a unicode string");
|
tracemalloc_error("filename is not a unicode string");
|
||||||
|
|
Loading…
Reference in New Issue