Use uintptr_t for pointer int cast in SMBC_getdents_ctx()
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 30 Jun 2015 22:41:34 +0000 (10:41 +1200)
committerJeremy Allison <jra@samba.org>
Tue, 21 Jul 2015 03:14:20 +0000 (05:14 +0200)
On i386, unsigned long long is 64 bit while the pointer is 32, and
this fails under autobuild with -WError.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 21 05:14:20 CEST 2015 on sn-devel-104

source3/libsmb/libsmb_dir.c

index 636e0cc3bcb74d7bc843476596c70d9553d148c4..97ecaa405a78d904db9a1953a71a5a20bf07463d 100644 (file)
@@ -1129,7 +1129,7 @@ SMBC_getdents_ctx(SMBCCTX *context,
 
                /* Try and align the struct for the next entry
                   on a valid pointer boundary by appending zeros */
-               while((rem > 0) && ((unsigned long long)ndir & (sizeof(void*) - 1))) {
+               while((rem > 0) && ((uintptr_t)ndir & (sizeof(void*) - 1))) {
                        *ndir = '\0';
                        rem--;
                        ndir++;