Add TODO markers for elimination of fixed size buffers.

This commit is contained in:
Andrew Wood
2026-04-09 22:01:54 +01:00
parent 593723ba92
commit 2ff99ab1cd
+4
View File
@@ -262,6 +262,8 @@ static bool opts_watchfd_processname(opts_t opts, const char *process_name)
/* Read the lines of output from the child process. */
/* TODO: use getdelim() instead of fgets() to eliminate fixed buffers. */
ok = true;
memset(buffer, 0, sizeof(buffer));
while ((0 == feof(fptr)) && (NULL != fgets(buffer, (int) (sizeof(buffer) - 1), fptr))) {
@@ -329,6 +331,8 @@ static bool opts_watchfd_listfile(opts_t opts, const char *filename)
return false;
}
/* TODO: use getdelim() instead of fgets() to eliminate fixed buffers. */
linenumber = 0;
memset(buffer, 0, sizeof(buffer));