r11676: as tridge uses 0x%llx in his latest commits...
authorStefan Metzmacher <metze@samba.org>
Fri, 11 Nov 2005 10:49:55 +0000 (10:49 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:46:12 +0000 (13:46 -0500)
try to use it every where and see how portable it is

metze
(This used to be commit 66a94de5ddd09df858a515555c01aa3d4f7d3e96)

source4/librpc/ndr/ndr_basic.c
source4/torture/rpc/samsync.c
source4/torture/rpc/spoolss.c

index 8f2cf49a1cb436a38f39fcd8dfda3cd2f50ac491..d76fa45ec3848374fb61f4c9ca254b7c2922f7af 100644 (file)
@@ -649,10 +649,7 @@ void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32_t v)
 
 void ndr_print_udlong(struct ndr_print *ndr, const char *name, uint64_t v)
 {
-       ndr->print(ndr, "%-25s: 0x%08x%08x (%llu)", name,
-                  (uint32_t)(v >> 32),
-                  (uint32_t)(v & 0xFFFFFFFF),
-                  v);
+       ndr->print(ndr, "%-25s: 0x%016llx (%llu)", name, v, v);
 }
 
 void ndr_print_udlongr(struct ndr_print *ndr, const char *name, uint64_t v)
@@ -662,10 +659,7 @@ void ndr_print_udlongr(struct ndr_print *ndr, const char *name, uint64_t v)
 
 void ndr_print_dlong(struct ndr_print *ndr, const char *name, int64_t v)
 {
-       ndr->print(ndr, "%-25s: 0x%08x%08x (%lld)", name, 
-                  (uint32_t)(v >> 32), 
-                  (uint32_t)(v & 0xFFFFFFFF),
-                  v);
+       ndr->print(ndr, "%-25s: 0x%016llx (%lld)", name, v, v);
 }
 
 void ndr_print_hyper(struct ndr_print *ndr, const char *name, uint64_t v)
index 93bfb71325256dd36c857a832c57cfd0eab834a5..79dd8c9833b21b7b2db55886babb4c8d7a1483e6 100644 (file)
@@ -210,10 +210,8 @@ static struct sec_desc_buf *samsync_query_lsa_sec_desc(TALLOC_CTX *mem_ctx,
 
 #define TEST_UINT64_EQUAL(i1, i2) do {\
        if (i1 != i2) {\
-              printf("%s: uint64 mismatch: " #i1 ": 0x%08x%08x (%lld) != " #i2 ": 0x%08x%08x (%lld)\n", \
-                    __location__, \
-                    (uint32_t)(i1 >> 32), (uint32_t)(i1 & 0xFFFFFFFF), i1, \
-                     (uint32_t)(i2 >> 32), (uint32_t)(i2 & 0xFFFFFFFF), i2);\
+              printf("%s: uint64 mismatch: " #i1 ": 0x%016llx (%lld) != " #i2 ": 0x%016llx (%lld)\n", \
+                    __location__, i1, i1, i2, i2);\
              ret = False;\
        } \
 } while (0)
index 33e84a52763593b31a7d789ae9c8d3f65ca9dfec..76c8673d4feed8c9183c773f09aafe7a4926cb43 100644 (file)
@@ -80,9 +80,8 @@ struct test_spoolss_context {
 
 #define COMPARE_UINT64(c,r,e) do {\
        if (c.e != r.e){\
-               printf("%s: " #c "." #e "  0x%08X%08X (%llu) doesn't match " #r "." #e " 0x%08X%08X (%llu)\n",\
-                       __location__, (uint32_t)(c.e >> 32), (uint32_t)(c.e & 0xFFFFFFFF), c.e,\
-                       (uint32_t)(r.e >> 32), (uint32_t)(r.e & 0xFFFFFFFF), r.e);\
+               printf("%s: " #c "." #e "  0x%016llX (%llu) doesn't match " #r "." #e " 0x%016llX (%llu)\n",\
+                       __location__, c.e, c.e, r.e, r.e);\
                ret = False;\
        }\
 } while(0)