From 391f19fbecc95464ba04a28bfc71367b622a1d90 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 22 Oct 2017 20:03:06 +0000 Subject: Start line counting at 1 --- src/mdevd/PARSING.txt | 1 + src/mdevd/mdevd.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mdevd/PARSING.txt b/src/mdevd/PARSING.txt index 500a8a7..e8715dc 100644 --- a/src/mdevd/PARSING.txt +++ b/src/mdevd/PARSING.txt @@ -1,3 +1,4 @@ + /etc/mdev.conf parsing First pass: just count envmatches and scriptelems, to allocate arrays in the stack. diff --git a/src/mdevd/mdevd.c b/src/mdevd/mdevd.c index 296f290..88190ed 100644 --- a/src/mdevd/mdevd.c +++ b/src/mdevd/mdevd.c @@ -264,7 +264,7 @@ static inline void script_secondpass (char *s, scriptelem *script, struct envmat size_t mark = 0 ; size_t col0 = 0 ; size_t pos = 0 ; - unsigned int line = 0 ; + unsigned int line = 1 ; uint32_t state = 0 ; unsigned short i = 0 ; /* current scriptelem index */ unsigned short j = 0 ; /* current envmatch index */ -- cgit v1.2.3