|
From: Tony B. <to...@cy...> - 2025-09-02 17:18:01
|
'hd /sys/kernel/scst_tgt/trace_level' shows a series of extraneous nul
chars at the end of the first line.
Fixes: 9cbca538303f ("scst: Replace sprintf() with scnprintf() in sysfs callbacks")
Signed-off-by: Tony Battersby <to...@cy...>
---
scst/src/scst_sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c
index 66c9414cf..340e73520 100644
--- a/scst/src/scst_sysfs.c
+++ b/scst/src/scst_sysfs.c
@@ -156,8 +156,8 @@ static ssize_t scst_trace_level_show(const struct scst_trace_log *local_tbl,
{
ssize_t ret = 0;
- ret += scst_read_trace_tbl(scst_trace_tbl, buf, log_level, ret);
- ret += scst_read_trace_tbl(local_tbl, buf, log_level, ret);
+ ret = scst_read_trace_tbl(scst_trace_tbl, buf, log_level, ret);
+ ret = scst_read_trace_tbl(local_tbl, buf, log_level, ret);
ret += sysfs_emit_at(buf, ret,
"\n\n\nUsage:\n"
--
2.43.0
|