diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2016-07-15 19:33:01 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2016-07-15 19:33:01 +0000 |
commit | 2d3d5f5fd44b5ad2d7a6e25fce7aa4778e4a3a7b (patch) | |
tree | 944b972bd2bc945602c90b0c0a04c5401c6c7bf2 /main.c | |
parent | 5f847ab22e99d73a0733440c20af6ad390ccd6a4 (diff) | |
download | mandoc-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |