Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2014 17:43:37 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r268949 - head/usr.bin/vtfontcvt
Message-ID:  <201407211743.s6LHhbJd047589@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Jul 21 17:43:37 2014
New Revision: 268949
URL: http://svnweb.freebsd.org/changeset/base/268949

Log:
  Remove redundant return statement after errx
  
  MFC after:	3 days
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/usr.bin/vtfontcvt/vtfontcvt.c

Modified: head/usr.bin/vtfontcvt/vtfontcvt.c
==============================================================================
--- head/usr.bin/vtfontcvt/vtfontcvt.c	Mon Jul 21 17:18:00 2014	(r268948)
+++ head/usr.bin/vtfontcvt/vtfontcvt.c	Mon Jul 21 17:43:37 2014	(r268949)
@@ -111,10 +111,8 @@ add_mapping(struct glyph *gl, unsigned i
 
 	ml = &maps[map_idx];
 	if (TAILQ_LAST(ml, mapping_list) != NULL &&
-	    TAILQ_LAST(ml, mapping_list)->m_char >= c) {
+	    TAILQ_LAST(ml, mapping_list)->m_char >= c)
 		errx(1, "Bad ordering at character %u\n", c);
-		return (1);
-	}
 	TAILQ_INSERT_TAIL(ml, mp, m_list);
 
 	map_count[map_idx]++;
@@ -134,11 +132,9 @@ dedup_mapping(unsigned int map_idx)
 	TAILQ_FOREACH_SAFE(mp_bold, &maps[map_idx], m_list, mp_temp) {
 		while (mp_normal->m_char < mp_bold->m_char)
 			mp_normal = TAILQ_NEXT(mp_normal, m_list);
-		if (mp_bold->m_char != mp_normal->m_char) {
+		if (mp_bold->m_char != mp_normal->m_char)
 			errx(1, "Character %u not in normal font!\n",
 			    mp_bold->m_char);
-			return (1);
-		}
 		if (mp_bold->m_glyph != mp_normal->m_glyph)
 			continue;
 
@@ -211,11 +207,8 @@ parse_bitmap_line(uint8_t *left, uint8_t
 	uint8_t *p;
 	unsigned int i, subline;
 
-	if (dwidth != width && dwidth != width * 2) {
-		errx(1,
-		    "Bitmap with unsupported width %u!\n", dwidth);
-		return (1);
-	}
+	if (dwidth != width && dwidth != width * 2)
+		errx(1, "Bitmap with unsupported width %u!\n", dwidth);
 
 	/* Move pixel data right to simplify splitting double characters. */
 	line >>= (howmany(dwidth, 8) * 8) - dwidth;
@@ -232,9 +225,7 @@ parse_bitmap_line(uint8_t *left, uint8_t
 			*p++ = subline >> 8;
 			*p = subline;
 		} else {
-			errx(1,
-			    "Unsupported wbytes %u!\n", wbytes);
-			return (1);
+			errx(1, "Unsupported wbytes %u!\n", wbytes);
 		}
 
 		line >>= width;
@@ -265,10 +256,8 @@ parse_bdf(FILE *fp, unsigned int map_idx
 		if (strncmp(ln, "BITMAP", 6) == 0 &&
 		    (ln[6] == ' ' || ln[6] == '\0')) {
 			for (i = 0; i < height; i++) {
-				if ((ln = fgetln(fp, &length)) == NULL) {
+				if ((ln = fgetln(fp, &length)) == NULL)
 					errx(1, "Unexpected EOF!\n");
-					return (1);
-				}
 				ln[length - 1] = '\0';
 				sscanf(ln, "%x", &line);
 				if (parse_bitmap_line(bytes + i * wbytes,
@@ -528,10 +517,8 @@ main(int argc, char *argv[])
 		switch (ch) {
 		case 'h':
 			val = atoi(optarg);
-			if (val <= 0 || val > 128) {
+			if (val <= 0 || val > 128)
 				errx(1, "Invalid height %d", val);
-				return (1);
-			}
 			height = val;
 			break;
 		case 'v':



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407211743.s6LHhbJd047589>