aboutsummaryrefslogtreecommitdiffstats
path: root/src/tok.c
diff options
context:
space:
mode:
authorkatherine <ageha@airen-no-jikken.icu>2019-07-10 20:24:08 -0700
committerkatherine <ageha@airen-no-jikken.icu>2019-07-10 20:24:08 -0700
commit06cb82a8ccc3587dff728321dff5416b18090483 (patch)
tree95dc02df244856b5ede95a3a1a44ea756e850203 /src/tok.c
parent34271c906a2de43a68d2fa764d31e6f5b2c3299f (diff)
downloadconfconf-06cb82a8ccc3587dff728321dff5416b18090483.tar.gz
implement deftype get
Diffstat (limited to 'src/tok.c')
-rw-r--r--src/tok.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tok.c b/src/tok.c
index 9b57459..e6b385d 100644
--- a/src/tok.c
+++ b/src/tok.c
@@ -236,6 +236,8 @@ static void sub_match_header(void)
void tok_reset(FILE *f)
{
+ assert(f != NULL);
+
curf = f;
curtok.line = 1;
curtok.col = 1;
@@ -252,7 +254,7 @@ struct tok_s tok_get(void)
if (unget) {
unget = false;
return curtok;
- }
+ }
curtok.col += vlen;
vlen = 0;