summaryrefslogtreecommitdiff
path: root/libc/stdio
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-11-04 04:37:24 +0000
committerEric Andersen <andersen@codepoet.org>2000-11-04 04:37:24 +0000
commite547d07a488ab17397217e2a57594c78bf747373 (patch)
tree27ff5a616a1a4c6172cceb824be19e609b5d80a1 /libc/stdio
parentcb9fa11843a7ea4a353a1a9954c8e054b35332b2 (diff)
More cleanups. Fix things so tinylogin compiles.
Fix a bug in getdelim -- patch from David Whedon <dwhedon@gordian.com>.
Diffstat (limited to 'libc/stdio')
-rw-r--r--libc/stdio/getdelim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/stdio/getdelim.c b/libc/stdio/getdelim.c
index 99d48bb32..f8341cb0d 100644
--- a/libc/stdio/getdelim.c
+++ b/libc/stdio/getdelim.c
@@ -58,13 +58,13 @@ size_t getdelim(char **linebuf, size_t *linebufsz, int delimiter, FILE *file)
return -1;
}
}
- *linebuf[idx++] = (char)ch;
+ (*linebuf)[idx++] = (char)ch;
if ((char)ch == delimiter)
break;
}
if (idx != 0)
- *linebuf[idx] = 0;
+ (*linebuf)[idx] = 0;
return idx;
}