summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/str.c
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-02-07 07:54:23 +0000
committerharti <harti@FreeBSD.org>2005-02-07 07:54:23 +0000
commit92a5e4fdd6e689f9a8570f20066b1db264ded799 (patch)
tree5139321e24b73eb766d0d1666c28d2d79a8abd00 /usr.bin/make/str.c
parentc45831f7c65accf983e86b1f1a883f20c27133e0 (diff)
downloadFreeBSD-src-92a5e4fdd6e689f9a8570f20066b1db264ded799.zip
FreeBSD-src-92a5e4fdd6e689f9a8570f20066b1db264ded799.tar.gz
Invent a Buf_AppendRange function that appends a non-NUL-terminated string
given by a pointer to the start of the string and a pointer one behind the end. Submitted by: Max Okumoto <okumoto@ucsd.edu>
Diffstat (limited to 'usr.bin/make/str.c')
-rw-r--r--usr.bin/make/str.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/make/str.c b/usr.bin/make/str.c
index 52cb9cc..68cec0c 100644
--- a/usr.bin/make/str.c
+++ b/usr.bin/make/str.c
@@ -515,7 +515,7 @@ Str_SYSVSubst(Buffer *buf, const char *pat, const char *src, int len)
if ((m = strchr(pat, '%')) != NULL) {
/* Copy the prefix */
- Buf_AddBytes(buf, m - pat, (const Byte *)pat);
+ Buf_AppendRange(buf, pat, m);
/* skip the % */
pat = m + 1;
}
OpenPOWER on IntegriCloud