diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-07-24 18:52:48 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-07-24 18:52:48 +0000 |
commit | 98982aacf0aa7545ab1423f476775a35cb6b63a1 (patch) | |
tree | 09e35dfccd9c5b3a0df3abdf9406f6480f7b15b0 /usr.bin/make/arch.c | |
parent | ee4d80f5e59727a3f7a3986c1ecfce78aaac6ac9 (diff) |
change Var_ParseSkip API to increment the position instead of returning a
length, simplifies code.
(warns a bit, symptom of some further issues to fix).
okay millert@
Diffstat (limited to 'usr.bin/make/arch.c')
-rw-r--r-- | usr.bin/make/arch.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c index 1975d1a4583..9edc2c7eca1 100644 --- a/usr.bin/make/arch.c +++ b/usr.bin/make/arch.c @@ -1,5 +1,5 @@ /* $OpenPackages$ */ -/* $OpenBSD: arch.c,v 1.56 2007/03/20 03:50:39 tedu Exp $ */ +/* $OpenBSD: arch.c,v 1.57 2007/07/24 18:52:47 espie Exp $ */ /* $NetBSD: arch.c,v 1.17 1996/11/06 17:58:59 christos Exp $ */ /* @@ -241,10 +241,7 @@ Arch_ParseArchive(char **linePtr, /* Pointer to start of specification */ for (cp = libName; *cp != '(' && *cp != '\0';) { if (*cp == '$') { - bool ok; - - cp += Var_ParseSkip(cp, ctxt, &ok); - if (ok == false) + if (!Var_ParseSkip(&cp, ctxt)) return false; subLibName = true; } else @@ -266,9 +263,7 @@ Arch_ParseArchive(char **linePtr, /* Pointer to start of specification */ memberName = cp; while (*cp != '\0' && *cp != ')' && !isspace(*cp)) { if (*cp == '$') { - bool ok; - cp += Var_ParseSkip(cp, ctxt, &ok); - if (ok == false) + if (!Var_ParseSkip(&cp, ctxt)) return false; doSubst = true; } else |