summaryrefslogtreecommitdiff
path: root/bin/ksh
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-11-05 18:39:35 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-11-05 18:39:35 +0000
commitaf9cad284a74913cba0bc493f7b9808a9ea10d21 (patch)
tree8d39cbac4d6363ef72c921f6763f0e9686b6aeb9 /bin/ksh
parent1787cb6e46c9d037e13d27850a09cb864ddfd70b (diff)
Clean up an Xstring macro. Submitted by Theo Buehler.
ok and suggestions from nicm@
Diffstat (limited to 'bin/ksh')
-rw-r--r--bin/ksh/expand.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/ksh/expand.h b/bin/ksh/expand.h
index 6d52c295cdd..9ec0e4dddef 100644
--- a/bin/ksh/expand.h
+++ b/bin/ksh/expand.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: expand.h,v 1.10 2015/11/01 16:03:11 mmcc Exp $ */
+/* $OpenBSD: expand.h,v 1.11 2015/11/05 18:39:34 mmcc Exp $ */
/*
* Expanding strings
@@ -58,8 +58,7 @@ typedef char * XStringP;
#define Xfree(xs, xp) afree((xs).beg, (xs).areap)
/* close, return string */
-#define Xclose(xs, xp) (char*) aresize((void*)(xs).beg, \
- (size_t)((xp) - (xs).beg), (xs).areap)
+#define Xclose(xs, xp) aresize((xs).beg, ((xp) - (xs).beg), (xs).areap)
/* begin of string */
#define Xstring(xs, xp) ((xs).beg)