1
0
mirror of https://gitlab.com/80486DX2-66/gists synced 2025-05-31 08:31:41 +05:30

freadln.c: add a comment to indicate initial length

This commit is contained in:
2024-03-10 14:40:02 +03:00
parent e8d66db238
commit 1a69cfa4ad

View File

@@ -33,7 +33,7 @@ int freadln(FILE* f, char** output, size_t* length_out) {
// make sure a prompt is displayed
fflush(stdout);
freadln_length_type length = 0;
freadln_length_type length = 0; // initial length
*output = malloc((length + 1) * sizeof(char));
if (*output == NULL)