From d3cbcbd5c0b22ce8ef368f2278fa4421c91f7502 Mon Sep 17 00:00:00 2001 From: "Timur I. Bakeyev" Date: Thu, 10 May 2018 10:28:07 +0800 Subject: [PATCH] Remove extra 0x prefix for the "%p" format specifiers, avoiding 0x0x0 strings in the output. Signed-off-by: Timur I. Bakeyev Reviewed-by: Ralph Boehme Reviewed-by: Martin Schwenke --- lib/dbwrap/dbwrap_tdb.c | 2 +- lib/talloc/pytalloc.c | 2 +- source3/modules/vfs_catia.c | 4 ++-- source3/smbd/open.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/dbwrap/dbwrap_tdb.c b/lib/dbwrap/dbwrap_tdb.c index c30bedee7754..28e09d31963a 100644 --- a/lib/dbwrap/dbwrap_tdb.c +++ b/lib/dbwrap/dbwrap_tdb.c @@ -142,7 +142,7 @@ static struct db_record *db_tdb_fetch_locked_internal( state.result->storev = db_tdb_storev; state.result->delete_rec = db_tdb_delete; - DEBUG(10, ("Allocated locked data 0x%p\n", state.result)); + DEBUG(10, ("Allocated locked data %p\n", state.result)); return state.result; } diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc.c index 3532fdf52914..95dbb297a460 100644 --- a/lib/talloc/pytalloc.c +++ b/lib/talloc/pytalloc.c @@ -86,7 +86,7 @@ static PyObject *pytalloc_default_repr(PyObject *obj) pytalloc_Object *talloc_obj = (pytalloc_Object *)obj; PyTypeObject *type = (PyTypeObject*)PyObject_Type(obj); - return PyStr_FromFormat("<%s talloc object at 0x%p>", + return PyStr_FromFormat("<%s talloc object at %p>", type->tp_name, talloc_obj->ptr); } diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index b8c61e26ab8c..ed22fa833b30 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -251,9 +251,9 @@ static void catia_debug_cc(int lvl, files_struct *fsp, const char *location) { - DEBUG(lvl, ("%s: cc [0x%p] cc->busy [0x%p] " + DEBUG(lvl, ("%s: cc [%p] cc->busy [%p] " "is_fsp_ext [%s] " - "fsp [0x%p] fsp name [%s] " + "fsp [%p] fsp name [%s] " "orig_fname [%s] " "fname [%s] " "orig_base_fname [%s] " diff --git a/source3/smbd/open.c b/source3/smbd/open.c index d385b54147f3..3adea77902f4 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -5051,7 +5051,7 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, "file_attributes = 0x%x, share_access = 0x%x, " "create_disposition = 0x%x create_options = 0x%x " "oplock_request = 0x%x private_flags = 0x%x " - "ea_list = 0x%p, sd = 0x%p, " + "ea_list = %p, sd = %p, " "fname = %s\n", (unsigned int)access_mask, (unsigned int)file_attributes, @@ -5594,7 +5594,7 @@ NTSTATUS create_file_default(connection_struct *conn, "create_disposition = 0x%x create_options = 0x%x " "oplock_request = 0x%x " "private_flags = 0x%x " - "root_dir_fid = 0x%x, ea_list = 0x%p, sd = 0x%p, " + "root_dir_fid = 0x%x, ea_list = %p, sd = %p, " "fname = %s\n", (unsigned int)access_mask, (unsigned int)file_attributes, -- 2.34.1