Message ID | 20180629094700.5445-1-rv@rasmusvillemoes.dk |
---|---|
State | New |
Headers | show |
Series | fixincludes: vxworks: remove unnecessary parentheses in ioctl wrapper macro | expand |
Hi Rasmus, > On 29 Jun 2018, at 11:47, Rasmus Villemoes <rv@rasmusvillemoes.dk> wrote: > - "#define ioctl(fd, func, arg) (ioctl)(fd, func, (int)(arg))\n"; > + "#define ioctl(fd, func, arg) ioctl(fd, func, (int)(arg))\n"; ok by me, thanks.
On Mon, Sep 3, 2018 at 2:46 AM Olivier Hainque <hainque@adacore.com> wrote: > > - "#define ioctl(fd, func, arg) (ioctl)(fd, func, (int)(arg))\n"; > > + "#define ioctl(fd, func, arg) ioctl(fd, func, (int)(arg))\n"; > > ok by me, thanks. Shouldn't this qualify as "trivial"? :)
> On 3 Sep 2018, at 17:25, Bruce Korb <bkorb@gnu.org> wrote: > > On Mon, Sep 3, 2018 at 2:46 AM Olivier Hainque <hainque@adacore.com> wrote: >>> - "#define ioctl(fd, func, arg) (ioctl)(fd, func, (int)(arg))\n"; >>> + "#define ioctl(fd, func, arg) ioctl(fd, func, (int)(arg))\n"; >> >> ok by me, thanks. > > Shouldn't this qualify as "trivial"? :) Probably, though I kept thinking there might have been a particular reason, which I couldn't grasp, why the parens had been introduced back then. Thanks for chiming in :-)
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index c1f5a13eda4..f7d2124ba74 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -4902,7 +4902,7 @@ fix = { c_fix = format; c_fix_arg = "%0\n" - "#define ioctl(fd, func, arg) (ioctl)(fd, func, (int)(arg))\n"; + "#define ioctl(fd, func, arg) ioctl(fd, func, (int)(arg))\n"; c_fix_arg = "extern[\t ]+int[\t ]+ioctl[\t ]*\\([\t ,[:alnum:]]*\\);"; test_text = "extern int ioctl ( int asdf1234, int jkl , int qwerty ) ;";