[PATCH] server_ioctl_file() - Prefix printed hex values with '0x'

Chris Morgan chmorgan at gmail.com
Fri Mar 3 13:35:20 CST 2017


On Fri, Mar 3, 2017 at 2:31 PM Alexandre Julliard <julliard at winehq.org>
wrote:

> Chris Morgan <chmorgan at gmail.com> writes:
>
> > Avoids the ambiguity with non-alphanumeric hex values.
> >
> > Signed-off-by: Chris Morgan <chmorgan at gmail.com>
> > ---
> >  dlls/ntdll/file.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
> > index fd7f3dd..4d081b7 100644
> > --- a/dlls/ntdll/file.c
> > +++ b/dlls/ntdll/file.c
> > @@ -1567,7 +1567,7 @@ static NTSTATUS server_ioctl_file( HANDLE handle,
> HANDLE event,
> >      SERVER_END_REQ;
> >
> >      if (status == STATUS_NOT_SUPPORTED)
> > -        FIXME("Unsupported ioctl %x (device=%x access=%x func=%x
> method=%x)\n",
> > +        FIXME("Unsupported ioctl 0x%x (device=0x%x access=0x%x
> func=0x%x method=0x%x)\n",
>
> That's mostly a matter of taste, so I don't think it's necessary to
> change it.
>
> --
> Alexandre Julliard
> julliard at winehq.org


Ok. I think most of the rest of the file uses 0x and it cost me an hour or
so before I figured out they weren't decimal values as they didn't include
any letters. And the list of FSCTL options in headers uses decimal so that
was another layer of confusion.

There is one more case that doesn't use 0x that I found after submitting
the patch.

I'd still like to advocate for being explicit because it isn't always
obvious what base is used.

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20170303/dccb204f/attachment.html>


More information about the wine-devel mailing list