summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Jing <liujing@cmss.chinamobile.com>2026-09-03 16:13:50 +0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-09-08 17:57:06 -0300
commit9e8c2fbadfa44d3cadfeaaefae1423259982bed5 (patch)
treedb87979900c26d26fe5ba1090db9f4f6f0515910
parent454e049a3f6528a04f96afb4cbef1fcbb49c2d0f (diff)
downloadlinux-next-9e8c2fbadfa44d3cadfeaaefae1423259982bed5.tar.gz
linux-next-9e8c2fbadfa44d3cadfeaaefae1423259982bed5.zip
perf python: Fix redundant self-assignment in get_argument_count()
In get_argument_count(), the variable code_obj is assigned to itself before being assigned the result of PyObject_GetAttrString(). This is a redundant self-assignment that appears to be a typo. Fix it by removing the redundant self-assignment. Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/scripting-engines/trace-event-python.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index 8f832ae316ca..7e8e3a7df1b1 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -165,7 +165,7 @@ static int get_argument_count(PyObject *handler)
{
int arg_count = 0;
- PyObject *code_obj = code_obj = PyObject_GetAttrString(handler, "__code__");
+ PyObject *code_obj = PyObject_GetAttrString(handler, "__code__");
PyErr_Clear();
if (code_obj) {
PyObject *arg_count_obj = PyObject_GetAttrString(code_obj,