summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-10-22 20:03:06 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-10-22 20:03:06 +0000
commit391f19fbecc95464ba04a28bfc71367b622a1d90 (patch)
tree9448b5d80e769178e9c201aa422a1ac138ba39fe
parent8b55f6f077c72d8294a67c752a4f761429ef52b0 (diff)
downloadmdevd-391f19fbecc95464ba04a28bfc71367b622a1d90.tar.xz
Start line counting at 1
-rw-r--r--src/mdevd/PARSING.txt1
-rw-r--r--src/mdevd/mdevd.c2
2 files changed, 2 insertions, 1 deletions
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 */