summaryrefslogtreecommitdiff
path: root/xs_io.h
diff options
context:
space:
mode:
authorGravatar grunfink2025-02-06 09:42:02 +0000
committerGravatar grunfink2025-02-06 09:42:02 +0000
commitc5bdd89f69a936c0c9a5766ebbca2f6e966b8652 (patch)
tree0d818c0a7deb28e40c9504643a647e08ae3e1b60 /xs_io.h
parentAdded an anchor to the post link in the date. (diff)
parentRewrite http header parsing (diff)
downloadsnac2-c5bdd89f69a936c0c9a5766ebbca2f6e966b8652.tar.gz
snac2-c5bdd89f69a936c0c9a5766ebbca2f6e966b8652.tar.xz
snac2-c5bdd89f69a936c0c9a5766ebbca2f6e966b8652.zip
Merge pull request 'Rewrite http header parsing' (#298) from inz/snac2:http-header-parse into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/298
Diffstat (limited to 'xs_io.h')
-rw-r--r--xs_io.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/xs_io.h b/xs_io.h
index 8fc5d6f..9c5018e 100644
--- a/xs_io.h
+++ b/xs_io.h
@@ -14,7 +14,7 @@ xs_val *xs_readall(FILE *f);
14xs_str *xs_readline(FILE *f) 14xs_str *xs_readline(FILE *f)
15/* reads a line from a file */ 15/* reads a line from a file */
16{ 16{
17 xs_str *s = NULL; 17 xs_str *s = xs_str_new(NULL);
18 18
19 errno = 0; 19 errno = 0;
20 20
@@ -22,8 +22,6 @@ xs_str *xs_readline(FILE *f)
22 if (!feof(f)) { 22 if (!feof(f)) {
23 int c; 23 int c;
24 24
25 s = xs_str_new(NULL);
26
27 while ((c = fgetc(f)) != EOF) { 25 while ((c = fgetc(f)) != EOF) {
28 unsigned char rc = c; 26 unsigned char rc = c;
29 27