From: Tian Gao Date: Tue, 9 Apr 2024 08:54:28 +0000 (-0700) Subject: gh-107674: Remove some unnecessary code in instrumentation code (GH-117393) X-Git-Tag: v3.13.0a6~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=57183241af76bf33e44d886a733f799d20fc680c;p=thirdparty%2FPython%2Fcpython.git gh-107674: Remove some unnecessary code in instrumentation code (GH-117393) --- diff --git a/Python/instrumentation.c b/Python/instrumentation.c index 0f6029086500..3866144a19bf 100644 --- a/Python/instrumentation.c +++ b/Python/instrumentation.c @@ -1197,7 +1197,7 @@ _Py_call_instrumentation_line(PyThreadState *tstate, _PyInterpreterFrame* frame, /* Special case sys.settrace to avoid boxing the line number, * only to immediately unbox it. */ if (tools & (1 << PY_MONITORING_SYS_TRACE_ID)) { - if (tstate->c_tracefunc != NULL && line >= 0) { + if (tstate->c_tracefunc != NULL) { PyFrameObject *frame_obj = _PyFrame_GetFrameObject(frame); if (frame_obj == NULL) { return -1;