From c598b1828f9d2c2d5b736ff640d1220343dd10e5 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sun, 15 Jun 2014 03:10:42 +0200 Subject: [PATCH] Remove some unneeded continue statements. --- lib/libc/resolv/res_init.c | 4 +--- sys/boot/pc32/libi386/biosdisk.c | 4 +--- sys/net/pf/if_pfsync.c | 1 - usr.bin/tail/tail.c | 2 -- usr.bin/units/units.c | 8 ++------ usr.sbin/lpr/chkprintcap/chkprintcap.c | 1 - usr.sbin/lpr/lpc/movejobs.c | 5 +---- 7 files changed, 5 insertions(+), 20 deletions(-) diff --git a/lib/libc/resolv/res_init.c b/lib/libc/resolv/res_init.c index e0f8838dd2..a33b5da151 100644 --- a/lib/libc/resolv/res_init.c +++ b/lib/libc/resolv/res_init.c @@ -446,10 +446,8 @@ __res_vinit(res_state statp, int preinit) { continue; } #endif - if (MATCH(buf, "options")) { + if (MATCH(buf, "options")) res_setoptions(statp, buf + sizeof("options") - 1, "conf"); - continue; - } } if (nserv > 0) statp->nscount = nserv; diff --git a/sys/boot/pc32/libi386/biosdisk.c b/sys/boot/pc32/libi386/biosdisk.c index d410d70d61..09c2657826 100644 --- a/sys/boot/pc32/libi386/biosdisk.c +++ b/sys/boot/pc32/libi386/biosdisk.c @@ -843,10 +843,8 @@ bd_chainextended(struct open_disk *od, u_int32_t base, u_int32_t offset) continue; } if ((dp1->dp_typ == DOSPTYP_EXT) || - (dp1->dp_typ == DOSPTYP_EXTLBA)) { + (dp1->dp_typ == DOSPTYP_EXTLBA)) bd_chainextended(od, base, dp1->dp_start); - continue; - } } } diff --git a/sys/net/pf/if_pfsync.c b/sys/net/pf/if_pfsync.c index 8791560445..53827a7292 100644 --- a/sys/net/pf/if_pfsync.c +++ b/sys/net/pf/if_pfsync.c @@ -600,7 +600,6 @@ pfsync_input(struct mbuf *m, ...) crit_exit(); goto done; } - continue; } } crit_exit(); diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c index eb393a7958..08b563b9ea 100644 --- a/usr.bin/tail/tail.c +++ b/usr.bin/tail/tail.c @@ -32,7 +32,6 @@ * @(#) Copyright (c) 1991, 1993 The Regents of the University of California. All rights reserved. * @(#)tail.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/tail/tail.c,v 1.6.2.2 2001/12/19 20:29:31 iedowse Exp $ - * $DragonFly: src/usr.bin/tail/tail.c,v 1.6 2005/03/01 21:37:33 cpressey Exp $ */ #include @@ -137,7 +136,6 @@ main(int argc, char **argv) fstat(fileno(file->fp), &file->st) == -1) { file->fp = NULL; ierr(); - continue; } } follow(files, style, off); diff --git a/usr.bin/units/units.c b/usr.bin/units/units.c index 49168975d2..fc0e8f8aa9 100644 --- a/usr.bin/units/units.c +++ b/usr.bin/units/units.c @@ -169,11 +169,9 @@ readunits(const char *userfile) lineptr[strlen(lineptr) - 1] = 0; prefixtable[prefixcount].prefixname = dupstr(lineptr); for (i = 0; i < prefixcount; i++) - if (!strcmp(prefixtable[i].prefixname, lineptr)) { + if (!strcmp(prefixtable[i].prefixname, lineptr)) warnx("redefinition of prefix '%s' on line %d ignored", lineptr, linenum); - continue; - } lineptr += len + 1; lineptr += strspn(lineptr, " \n\t"); len = strcspn(lineptr, "\n\t"); @@ -192,11 +190,9 @@ readunits(const char *userfile) } unittable[unitcount].uname = dupstr(lineptr); for (i = 0; i < unitcount; i++) - if (!strcmp(unittable[i].uname, lineptr)) { + if (!strcmp(unittable[i].uname, lineptr)) warnx("redefinition of unit '%s' on line %d ignored", lineptr, linenum); - continue; - } lineptr += len + 1; lineptr += strspn(lineptr, " \n\t"); if (!strlen(lineptr)) { diff --git a/usr.sbin/lpr/chkprintcap/chkprintcap.c b/usr.sbin/lpr/chkprintcap/chkprintcap.c index 13356f0f49..80b4d9eea9 100644 --- a/usr.sbin/lpr/chkprintcap/chkprintcap.c +++ b/usr.sbin/lpr/chkprintcap/chkprintcap.c @@ -262,7 +262,6 @@ check_spool_dirs(void) "directory", dp->path, dp->printer, dp2->path, dp2->printer); } - continue; } /* Should probably check owners and modes here. */ } diff --git a/usr.sbin/lpr/lpc/movejobs.c b/usr.sbin/lpr/lpc/movejobs.c index 989b73def0..1193e8142f 100644 --- a/usr.sbin/lpr/lpc/movejobs.c +++ b/usr.sbin/lpr/lpc/movejobs.c @@ -32,7 +32,6 @@ * ------+---------+---------+---------+---------+---------+---------+---------* * * $FreeBSD: src/usr.sbin/lpr/lpc/movejobs.c,v 1.1.2.1 2002/07/26 03:12:07 gad Exp $ - * $DragonFly: src/usr.sbin/lpr/lpc/movejobs.c,v 1.3 2005/08/08 18:58:56 joerg Exp $ */ /* @@ -89,10 +88,8 @@ process_jobs(int argc, char *argv[], process_jqe process_rtn, void *myinfo) STAILQ_INIT(&jobs_wanted); for (i = 0; i < argc; i++) { pjres = parse_jobspec(argv[i], &jobs_wanted); - if (pjres == 0) { + if (pjres == 0) printf("\tinvalid job specifier: %s\n", argv[i]); - continue; - } } matchcnt = scanq_jobspec(nitems, queue, SCQ_JSORDER, &jobs_wanted, process_rtn, myinfo); -- 2.41.0