Skip to content

Commit f4db95b

Browse files
captain5050namhyung
authored andcommitted
tools api io: Ensure line_len_out is always initialized
Ensure initialization to avoid compiler warnings about potential use of uninitialized variables. Signed-off-by: Ian Rogers <[email protected]> Cc: Ravi Bangoria <[email protected]> Cc: Yoshihiro Furudera <[email protected]> Cc: Howard Chu <[email protected]> Cc: Ze Gao <[email protected]> Cc: Changbin Du <[email protected]> Cc: Junhao He <[email protected]> Cc: Weilin Wang <[email protected]> Cc: James Clark <[email protected]> Cc: Oliver Upton <[email protected]> Cc: Athira Jajeev <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent 35de42c commit f4db95b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/lib/api/io.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ static inline ssize_t io__getdelim(struct io *io, char **line_out, size_t *line_
189189
err_out:
190190
free(line);
191191
*line_out = NULL;
192+
*line_len_out = 0;
192193
return -ENOMEM;
193194
}
194195

0 commit comments

Comments
 (0)