From 43a98ecb21cd93dd719096ab9b3e873e307b4643 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 9 Apr 2010 16:14:07 +0200 Subject: [PATCH] secur32: Avoid using a pointer difference in a trace. --- dlls/secur32/schannel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index 6205f1dc05b..64e08b70737 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -129,18 +129,19 @@ static ULONG_PTR schan_alloc_handle(void *object, enum schan_handle_type type) if (schan_free_handles) { + DWORD index = schan_free_handles - schan_handle_table; /* Use a free handle */ handle = schan_free_handles; if (handle->type != SCHAN_HANDLE_FREE) { - ERR("Handle %d(%p) is in the free list, but has type %#x.\n", (handle-schan_handle_table), handle, handle->type); + ERR("Handle %d(%p) is in the free list, but has type %#x.\n", index, handle, handle->type); return SCHAN_INVALID_HANDLE; } schan_free_handles = handle->object; handle->object = object; handle->type = type; - return handle - schan_handle_table; + return index; } if (!(schan_handle_count < schan_handle_table_size)) { -- 2.11.4.GIT