From: krw Date: Fri, 10 Jan 2014 01:25:03 +0000 (+0000) Subject: skip_to_semi() is gilding the lily when the next statement breaks out X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c021ee746d3558d6046caa271cada8f3a09568f9;p=openbsd skip_to_semi() is gilding the lily when the next statement breaks out of the loop and closes the file being parsed. And the previous statement warns the user the leases file being parsed has been determined to be corrupt. Eliminate further gilding in the form of an 'else' after the same 'if' clause includes the 'break'. --- diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c index 5ca5d1a00d8..35c90a4c016 100644 --- a/sbin/dhclient/clparse.c +++ b/sbin/dhclient/clparse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clparse.c,v 1.66 2014/01/10 01:07:58 krw Exp $ */ +/* $OpenBSD: clparse.c,v 1.67 2014/01/10 01:25:03 krw Exp $ */ /* Parser for dhclient config and lease files. */ @@ -130,10 +130,9 @@ read_client_leases(void) break; if (token != TOK_LEASE) { warning("Corrupt lease file - possible data loss!"); - skip_to_semi(cfile); break; - } else - parse_client_lease_statement(cfile, 0); + } + parse_client_lease_statement(cfile, 0); } while (1); fclose(cfile);