1
0
mirror of https://gitlab.com/80486DX2-66/gists synced 2024-12-26 11:30:03 +05:30

freadln.c: add a comment to indicate initial length

This commit is contained in:
Intel A80486DX2-66 2024-03-10 14:40:02 +03:00
parent e8d66db238
commit 1a69cfa4ad
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

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)