From owner-svn-src-all@FreeBSD.ORG Mon Jul 21 17:43:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01D613EE; Mon, 21 Jul 2014 17:43:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C997A20EF; Mon, 21 Jul 2014 17:43:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6LHhbFj047590; Mon, 21 Jul 2014 17:43:37 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6LHhbJd047589; Mon, 21 Jul 2014 17:43:37 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201407211743.s6LHhbJd047589@svn.freebsd.org> From: Ed Maste Date: Mon, 21 Jul 2014 17:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268949 - head/usr.bin/vtfontcvt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 17:43:38 -0000 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':