diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-11-05 18:39:35 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-11-05 18:39:35 +0000 |
commit | af9cad284a74913cba0bc493f7b9808a9ea10d21 (patch) | |
tree | 8d39cbac4d6363ef72c921f6763f0e9686b6aeb9 /bin/ksh | |
parent | 1787cb6e46c9d037e13d27850a09cb864ddfd70b (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.h | 5 |
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) |