aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-04-09 15:35:30 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-04-09 15:35:30 +0000
commit629374d4ffde37c9a77c85f9a2e2e819c0efd53e (patch)
tree7c981cc55a4a7a302148c9e0d19088b54dd108a9 /mandoc.c
parentdc6820cf87c36506f7d235493e75c1520231e9d9 (diff)
downloadmandoc-629374d4ffde37c9a77c85f9a2e2e819c0efd53e.tar.gz
mandoc-629374d4ffde37c9a77c85f9a2e2e819c0efd53e.tar.zst
mandoc-629374d4ffde37c9a77c85f9a2e2e819c0efd53e.zip
Lint catching some potential issues.
Diffstat (limited to 'mandoc.c')
-rw-r--r--mandoc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mandoc.c b/mandoc.c
index 16912060..2c59d598 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -1,4 +1,4 @@
-/* $Id: mandoc.c,v 1.45 2011/04/09 15:29:40 kristaps Exp $ */
+/* $Id: mandoc.c,v 1.46 2011/04/09 15:35:30 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -116,10 +116,9 @@ mandoc_escape(const char **end, const char **start, int *sz)
rstart = cp;
if (start)
*start = rstart;
- i = 0;
+ i = lim = 0;
gly = ESCAPE_ERROR;
- term = '\0';
- numeric = 0;
+ term = numeric = '\0';
switch ((c = cp[i++])) {
/*
@@ -379,6 +378,7 @@ out:
gly = ESCAPE_FONTROMAN;
break;
}
+ break;
case (ESCAPE_SPECIAL):
if (1 != rlim)
break;