[PATCH v4 1/5] tools api io: Ensure line_len_out is always initialized

From: Ian Rogers
Date: Tue Oct 15 2024 - 17:07:13 EST


Ensure initialization to avoid compiler warnings about potential use
of uninitialized variables.

Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/lib/api/io.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/lib/api/io.h b/tools/lib/api/io.h
index d3eb04d1bc89..1731996b2c32 100644
--- a/tools/lib/api/io.h
+++ b/tools/lib/api/io.h
@@ -189,6 +189,7 @@ static inline ssize_t io__getdelim(struct io *io, char **line_out, size_t *line_
err_out:
free(line);
*line_out = NULL;
+ *line_len_out = 0;
return -ENOMEM;
}

--
2.47.0.rc1.288.g06298d1525-goog