mirror of
https://gitlab.com/80486DX2-66/gists
synced 2024-12-28 00:00:18 +05:30
freadln.c: add a comment to indicate initial length
This commit is contained in:
parent
e8d66db238
commit
1a69cfa4ad
@ -33,7 +33,7 @@ int freadln(FILE* f, char** output, size_t* length_out) {
|
|||||||
// make sure a prompt is displayed
|
// make sure a prompt is displayed
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
freadln_length_type length = 0;
|
freadln_length_type length = 0; // initial length
|
||||||
|
|
||||||
*output = malloc((length + 1) * sizeof(char));
|
*output = malloc((length + 1) * sizeof(char));
|
||||||
if (*output == NULL)
|
if (*output == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user