summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/cond.c
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-03-22 07:50:40 +0000
committerharti <harti@FreeBSD.org>2005-03-22 07:50:40 +0000
commit874c97e5d4e537574d18aafebeeb75aa669b938a (patch)
treee67abd68093686b188fd6b2a5f6a52f6876c065a /usr.bin/make/cond.c
parent091cf2f2956bcbd83353d9fb417db1c57d72f4d7 (diff)
downloadFreeBSD-src-874c97e5d4e537574d18aafebeeb75aa669b938a.zip
FreeBSD-src-874c97e5d4e537574d18aafebeeb75aa669b938a.tar.gz
Simplify buffer access by using Buf_Data() and Buf_Peel() where
appropriate. Patch: 7.147-7.151 Submitted by: Max Okumoto <okumoto@ucsd.edu>
Diffstat (limited to 'usr.bin/make/cond.c')
-rw-r--r--usr.bin/make/cond.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c
index b7df2bf..235203f 100644
--- a/usr.bin/make/cond.c
+++ b/usr.bin/make/cond.c
@@ -630,10 +630,7 @@ do_string_compare:
}
}
- Buf_AddByte(buf, (Byte)0);
-
- string = (char *)Buf_GetAll(buf, (size_t *)NULL);
- Buf_Destroy(buf, FALSE);
+ string = Buf_Peel(buf);
DEBUGF(COND, ("lhs = \"%s\", rhs = \"%s\", op = %.2s\n",
lhs, string, op));
OpenPOWER on IntegriCloud