diff options
| author | Xuewen Wang <wangxuewen@kylinos.cn> | 2026-05-18 14:21:58 +0800 |
|---|---|---|
| committer | Vlastimil Babka (SUSE) <vbabka@kernel.org> | 2026-05-29 11:49:15 +0200 |
| commit | 76c2db064bc11dd13b0a6c078414b0a62b8128f5 (patch) | |
| tree | f27dd1d1a0cb3ebe57113f77dcdaa4f0abf9dabc /tools | |
| parent | 235ab68d67eadbef1fdbfb771f21f5bacc77a2ae (diff) | |
| download | linux-next-history-76c2db064bc11dd13b0a6c078414b0a62b8128f5.tar.gz | |
tools/mm/slabinfo: remove dead assignment in get_obj_and_str()
The assignment `x = NULL` sets the local parameter variable instead of
`*x`, which is a no-op since `*x` was already set to NULL on the line
above. Remove the dead assignment.
Signed-off-by: Xuewen Wang <wangxuewen@kylinos.cn>
Reviewed-by: SeongJae Park <sj@kernel.org>
Link: https://patch.msgid.link/20260518062159.80664-3-wangxuewen@kylinos.cn
Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mm/slabinfo.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/mm/slabinfo.c b/tools/mm/slabinfo.c index 39f7eae7eecda..685bcdd03568e 100644 --- a/tools/mm/slabinfo.c +++ b/tools/mm/slabinfo.c @@ -193,10 +193,9 @@ static unsigned long get_obj_and_str(const char *name, char **x) *x = NULL; - if (!read_obj(name)) { - x = NULL; + if (!read_obj(name)) return 0; - } + result = strtoul(buffer, &p, 10); while (*p == ' ') p++; |
