Alexandre Julliard : secur32: Avoid using a pointer difference in a trace.
Alexandre Julliard
julliard at winehq.org
Fri Apr 9 11:49:56 CDT 2010
Module: wine
Branch: master
Commit: 43a98ecb21cd93dd719096ab9b3e873e307b4643
URL: http://source.winehq.org/git/wine.git/?a=commit;h=43a98ecb21cd93dd719096ab9b3e873e307b4643
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Apr 9 16:14:07 2010 +0200
secur32: Avoid using a pointer difference in a trace.
---
dlls/secur32/schannel.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
index 6205f1d..64e08b7 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))
{
More information about the wine-cvs
mailing list