This allows compilation on i386 with -WError. Otherwise we see
this:
../source4/torture/smb2/durable_open.c:41:23: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
__location__, #v, (unsigned long long)v, (unsigned long long)correct); \
because the pointer is 32 bits, while long long is 64.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
ret = false; \
}} while (0)
+#define CHECK_NOT_NULL(p) do { \
+ if ((p) == NULL) { \
+ torture_result(tctx, TORTURE_FAIL, "(%s): %s is NULL but it should not be.\n", \
+ __location__, #p); \
+ ret = false; \
+ }} while (0)
+
#define CHECK_STATUS(status, correct) do { \
if (!NT_STATUS_EQUAL(status, correct)) { \
torture_result(tctx, TORTURE_FAIL, __location__": Incorrect status %s - should be %s", \
/* prepare buffer */
b = talloc_zero_size(mem_ctx, alloc_size_step);
- CHECK_NOT_VAL(b, NULL);
+ CHECK_NOT_NULL(b);
previous_session_id = smb2cli_session_current_id(tree->session->smbXcli);