Skip to content

Commit fb8b818

Browse files
walaclenticularis39
authored andcommitted
rtla: Fix parse_cpu_set() return value documentation
Correct the return value documentation for parse_cpu_set() function in utils.c. The comment incorrectly stated that the function returns 1 on success and 0 on failure, but the actual implementation returns 0 on success and 1 on failure, following the common error-on-nonzero convention used throughout the codebase. This documentation fix ensures that developers reading the code understand the correct return value semantics and prevents potential misuse of the function's return value in conditional checks. Signed-off-by: Wander Lairson Costa <wander@redhat.com> Link: https://lore.kernel.org/r/20260106133655.249887-18-wander@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
1 parent 33e3c80 commit fb8b818

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/tracing/rtla/src/utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void get_duration(time_t start_time, char *output, int output_size)
113113
* Receives a cpu list, like 1-3,5 (cpus 1, 2, 3, 5), and then set
114114
* filling cpu_set_t argument.
115115
*
116-
* Returns 1 on success, 0 otherwise.
116+
* Returns 0 on success, 1 otherwise.
117117
*/
118118
int parse_cpu_set(char *cpu_list, cpu_set_t *set)
119119
{

0 commit comments

Comments
 (0)