summaryrefslogtreecommitdiff
path: root/src/user/lib/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/lib/file.c')
-rw-r--r--src/user/lib/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/user/lib/file.c b/src/user/lib/file.c
index 05ae2e8..b55a19d 100644
--- a/src/user/lib/file.c
+++ b/src/user/lib/file.c
@@ -151,7 +151,7 @@ size_t fwrite(const void *restrict ptr, size_t size, size_t nitems, FILE *restri
char *fgets(char *buf, int size, FILE *f) {
char c = '\0';
- size_t pos = 0;
+ long pos = 0;
while (pos < (size-1) && c != '\n' && fread(&c, 1, 1, f))
buf[pos++] = c;
buf[pos++] = '\0';