From owner-svn-src-head@FreeBSD.ORG Mon Feb 3 18:31:51 2014 Return-Path: Delivered-To: svn-src-head@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 BD588E07; Mon, 3 Feb 2014 18:31:51 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8FDF6158F; Mon, 3 Feb 2014 18:31:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s13IVpaC003948; Mon, 3 Feb 2014 18:31:51 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s13IVpaw003947; Mon, 3 Feb 2014 18:31:51 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402031831.s13IVpaw003947@svn.freebsd.org> From: Warner Losh Date: Mon, 3 Feb 2014 18:31:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261442 - head/usr.sbin/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Feb 2014 18:31:51 -0000 Author: imp Date: Mon Feb 3 18:31:51 2014 New Revision: 261442 URL: http://svnweb.freebsd.org/changeset/base/261442 Log: Better error messages when EOF is hit in the middle of a phrase. Modified: head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Mon Feb 3 17:33:06 2014 (r261441) +++ head/usr.sbin/config/mkmakefile.c Mon Feb 3 18:31:51 2014 (r261442) @@ -329,9 +329,7 @@ next: } if (eq(wd, "include")) { wd = get_quoted_word(fp); - if (wd == (char *)EOF) - return; - if (wd == 0) { + if (wd == (char *)EOF || wd == 0) { fprintf(stderr, "%s: missing include filename.\n", fname); exit(1); @@ -436,9 +434,7 @@ nextparam: } if (eq(wd, "dependency")) { wd = get_quoted_word(fp); - if (wd == (char *)EOF) - return; - if (wd == 0) { + if (wd == (char *)EOF || wd == 0) { fprintf(stderr, "%s: %s missing dependency string.\n", fname, this); @@ -449,9 +445,7 @@ nextparam: } if (eq(wd, "clean")) { wd = get_quoted_word(fp); - if (wd == (char *)EOF) - return; - if (wd == 0) { + if (wd == (char *)EOF || wd == 0) { fprintf(stderr, "%s: %s missing clean file list.\n", fname, this); exit(1); @@ -461,9 +455,7 @@ nextparam: } if (eq(wd, "compile-with")) { wd = get_quoted_word(fp); - if (wd == (char *)EOF) - return; - if (wd == 0) { + if (wd == (char *)EOF || wd == 0) { fprintf(stderr, "%s: %s missing compile command string.\n", fname, this); @@ -474,9 +466,7 @@ nextparam: } if (eq(wd, "warning")) { wd = get_quoted_word(fp); - if (wd == (char *)EOF) - return; - if (wd == 0) { + if (wd == (char *)EOF || wd == 0) { fprintf(stderr, "%s: %s missing warning text string.\n", fname, this); @@ -487,9 +477,7 @@ nextparam: } if (eq(wd, "obj-prefix")) { wd = get_quoted_word(fp); - if (wd == (char *)EOF) - return; - if (wd == 0) { + if (wd == (char *)EOF || wd == 0) { printf("%s: %s missing object prefix string.\n", fname, this); exit(1);