diff options
| author | Santtu Lakkala <inz@inz.fi> | 2025-02-06 00:47:49 +0200 |
|---|---|---|
| committer | Santtu Lakkala <santtu.lakkala@unikie.com> | 2025-02-06 00:47:49 +0200 |
| commit | 1089b24171934bc742c2e438f17ec1774b90c728 (patch) | |
| tree | fe536ad310dcd25e0ceab11ef7700a6484a5e3d5 /xs_io.h | |
| parent | de8fd8305396abd1e7e7208f443be4a4891219cd (diff) | |
Rewrite http header parsing
Diffstat (limited to 'xs_io.h')
| -rw-r--r-- | xs_io.h | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -14,7 +14,7 @@ xs_val *xs_readall(FILE *f); xs_str *xs_readline(FILE *f) /* reads a line from a file */ { - xs_str *s = NULL; + xs_str *s = xs_str_new(NULL); errno = 0; @@ -22,8 +22,6 @@ xs_str *xs_readline(FILE *f) if (!feof(f)) { int c; - s = xs_str_new(NULL); - while ((c = fgetc(f)) != EOF) { unsigned char rc = c; |