summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-07-15 19:33:01 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-07-15 19:33:01 +0000
commit2d3d5f5fd44b5ad2d7a6e25fce7aa4778e4a3a7b (patch)
tree944b972bd2bc945602c90b0c0a04c5401c6c7bf2 /main.c
parent5f847ab22e99d73a0733440c20af6ad390ccd6a4 (diff)
downloadmandoc-2d3d5f5fd44b5ad2d7a6e25fce7aa4778e4a3a7b.tar.gz
To remove the const qualifier from a pointer to an object - either
because we know it is actually mutable or because we are passing it to a function that doesn't accept a const object but won't actually attempt to modify it - simply casting from (const type *) to (type *) is legal C and clearly expresses the intent. So get rid of the obfuscating UNCONST macro. Basic idea discussed with guenther@.
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 638f7068..a637ef4f 100644
--- a/main.c
+++ b/main.c
@@ -980,7 +980,7 @@ woptions(struct curparse *curp, char *arg)
while (*arg) {
o = arg;
- switch (getsubopt(&arg, UNCONST(toks), &v)) {
+ switch (getsubopt(&arg, (char * const *)toks, &v)) {
case 0:
curp->wstop = 1;
break;