aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAntoine Tenart <[email protected]>2024-10-17 17:24:17 +0200
committerPaolo Abeni <[email protected]>2024-10-23 10:28:19 +0200
commitd631094e4d20d136f159c6e0f723b7aecbc12d2f (patch)
treec54bdd05bf06c1c9c97fbafb15935cf87a2e66d7 /tools/perf/scripts/python
parent6886c14bdc309fa1c92b22f9587c5ca78f1920b7 (diff)
net: sysctl: remove always-true condition
Before adding a new line at the end of the temporary buffer in dump_cpumask, a length check is performed to ensure there is space for it. len = min(sizeof(kbuf) - 1, *lenp); len = scnprintf(kbuf, len, ...); if (len < *lenp) kbuf[len++] = '\n'; Note that the check is currently logically wrong, the written length is compared against the output buffer, not the temporary one. However this has no consequence as this is always true, even if fixed: scnprintf includes a null char at the end of the buffer but the returned length do not include it and there is always space for overriding it with a newline. Remove the condition. Signed-off-by: Antoine Tenart <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions