diff options
author | 2015-11-05 18:39:34 +0000 | |
---|---|---|
committer | 2015-11-05 18:39:34 +0000 | |
commit | e2f1b85e384fc37827e2f661e77080c082d8f655 (patch) | |
tree | 45c7d746a8971c28fec9663aa7bf43b4ae0302c8 | |
parent | pledge(2) for httpd. (diff) | |
download | wireguard-openbsd-e2f1b85e384fc37827e2f661e77080c082d8f655.tar.xz wireguard-openbsd-e2f1b85e384fc37827e2f661e77080c082d8f655.zip |
Clean up an Xstring macro. Submitted by Theo Buehler.
ok and suggestions from nicm@
-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) |