summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2014-02-03 18:31:51 +0000
committerimp <imp@FreeBSD.org>2014-02-03 18:31:51 +0000
commit27627234673e78ff7b27808895e4cc6906abbe24 (patch)
tree6077fd17ffd56c7bf6b4b5998bb00cb0cf3ef7ed
parentdf1c99a134c5ddf9e4abae3399d9faf16bf2696c (diff)
downloadFreeBSD-src-27627234673e78ff7b27808895e4cc6906abbe24.zip
FreeBSD-src-27627234673e78ff7b27808895e4cc6906abbe24.tar.gz
Better error messages when EOF is hit in the middle of a phrase.
-rw-r--r--usr.sbin/config/mkmakefile.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index 7d37475..7b11441 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -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);
OpenPOWER on IntegriCloud