mirror of
https://gitlab.com/80486DX2-66/gists
synced 2025-05-31 08:31:41 +05:30
freadln.*: fix error handling logic
This commit is contained in:
@@ -19,11 +19,10 @@ enum freadln_status {
|
||||
freadln_ERROR
|
||||
};
|
||||
|
||||
#define freadln_success_epilogue do { \
|
||||
#define freadln_epilogue do { \
|
||||
(*output)[length] = '\0'; \
|
||||
if (length_out != NULL) \
|
||||
*length_out = length; \
|
||||
return freadln_OK; \
|
||||
} while (0)
|
||||
|
||||
int freadln(FILE* f, char** output, size_t* length_out);
|
||||
|
||||
Reference in New Issue
Block a user