ntlmssp: get rid of "cast to pointer from integer of different size" warning on 64 bit
authorMichael Adam <obnox@samba.org>
Fri, 27 Jun 2008 10:42:07 +0000 (12:42 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 27 Jun 2008 12:27:30 +0000 (14:27 +0200)
Not sure if this check is actually necessary, though:
the second should be sufficient.

Michael

source/auth/ntlmssp/ntlmssp_parse.c

index 8e31d814d032744713e23ef81151d44397d23144..e1c1e7cbb32a9a0bf85840b6b50cf324515000f3 100644 (file)
@@ -241,7 +241,7 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
                                        ret = false;
                                        goto cleanup;
                                }
-                               if (blob->data + ptr < (uint8_t *)ptr ||
+                               if (blob->data + ptr < (uint8_t *)(uintptr_t)ptr ||
                                                blob->data + ptr < blob->data) {
                                        ret = false;
                                        goto cleanup;
@@ -276,7 +276,7 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
                                        goto cleanup;
                                }
 
-                               if (blob->data + ptr < (uint8_t *)ptr ||
+                               if (blob->data + ptr < (uint8_t *)(uintptr_t)ptr ||
                                                blob->data + ptr < blob->data) {
                                        ret = false;
                                        goto cleanup;
@@ -311,7 +311,7 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
                                        goto cleanup;
                                }
 
-                               if (blob->data + ptr < (uint8_t *)ptr ||
+                               if (blob->data + ptr < (uint8_t *)(uintptr_t)ptr ||
                                                blob->data + ptr < blob->data) {
                                        ret = false;
                                        goto cleanup;