diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-17 22:10:29 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-17 22:10:29 +0000 |
commit | 433225aa5c972c772c1c63614b12c9be6a42c910 (patch) | |
tree | 4426adcd28c1a4d849141cd54166f89266510921 | |
parent | 6f4c114ca6eed4eaa93fa12ae617b50f14d2ce58 (diff) | |
download | mandoc-433225aa5c972c772c1c63614b12c9be6a42c910.tar.gz mandoc-433225aa5c972c772c1c63614b12c9be6a42c910.tar.zst mandoc-433225aa5c972c772c1c63614b12c9be6a42c910.zip |
While all current callers pass valid data to ascii_hspan() only,
it's safer to assume incoming enum data might be invalid
and catch it instead of happily returning an unitialized int.
No functional change right now.
-rw-r--r-- | term_ascii.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/term_ascii.c b/term_ascii.c index 8a2458c3..ab629026 100644 --- a/term_ascii.c +++ b/term_ascii.c @@ -1,4 +1,4 @@ -/* $Id: term_ascii.c,v 1.31 2014/08/16 19:00:01 schwarze Exp $ */ +/* $Id: term_ascii.c,v 1.32 2014/08/17 22:10:29 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -253,7 +253,7 @@ ascii_hspan(const struct termp *p, const struct roffsu *su) case SCALE_EM: r = su->scale; break; - case SCALE_MAX: + default: abort(); /* NOTREACHED */ } |