[Samba] Fwd: [PATCH] Remove extra 0x in the %p formatting string
- Date: Sat, 12 May 2018 02:03:52 +0200
- From: "Timur I. Bakeyev via samba" <samba@xxxxxxxxxxxxxxx>
- Subject: [Samba] Fwd: [PATCH] Remove extra 0x in the %p formatting string
Can I get some review here, please?
---------- Forwarded message ----------
From: Timur I. Bakeyev <timur@xxxxxxxxxxx>
Date: 10 May 2018 at 18:51
Subject: [PATCH] Remove extra 0x in the %p formatting string
To: samba tech <samba-technical@xxxxxxxxxxxxxxx>
While analyzing debug logs of our customer, I've noticed strange looking
[2018/05/09 16:02:52.629315, 10, pid=907, effective(1001, 1001), real(0,
create_file: access_mask = 0x100080 file_attributes = 0x10, share_access
= 0x7, create_disposition = 0x1 create_options = 0x1 oplock_request = 0x0
private_flags = 0x0 root_dir_fid = 0x0, ea_list = 0x0x0, sd = 0x0x0, fname
That 0x0x0 puzzled me and short investigation showed that in few places we
use "0x%p" format string to represent buffer address in the debug logs. Man
page for *printf says:
p The void * pointer argument is printed in hexadecimal (as
by ‘%#x’ or ‘%#lx’).
I.e. the address will be already prefixed with the 0x, no need to
explicitly add it.
Here is a small patch.
To unsubscribe from this list go to the following URL and read the