Module: wine Branch: master Commit: db941dd078bd8344d2a5e329f7060fbc1440c531 URL: http://source.winehq.org/git/wine.git/?a=commit;h=db941dd078bd8344d2a5e329f7...
Author: Andrew Talbot Andrew.Talbot@talbotville.com Date: Sat Oct 28 17:27:26 2006 +0100
dbghelp: Cast-qual warnings fix.
---
dlls/dbghelp/source.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/dbghelp/source.c b/dlls/dbghelp/source.c index 133cd2f..5842a3f 100644 --- a/dlls/dbghelp/source.c +++ b/dlls/dbghelp/source.c @@ -59,6 +59,7 @@ unsigned source_new(struct module* modul int len; unsigned ret; const char* full; + char* tmp = NULL;
if (!name) return (unsigned)-1; if (!base || *name == '/') @@ -66,8 +67,8 @@ unsigned source_new(struct module* modul else { unsigned bsz = strlen(base); - char* tmp = HeapAlloc(GetProcessHeap(), 0, bsz + 1 + strlen(name) + 1);
+ tmp = HeapAlloc(GetProcessHeap(), 0, bsz + 1 + strlen(name) + 1); if (!tmp) return (unsigned)-1; full = tmp; strcpy(tmp, base); @@ -92,7 +93,7 @@ unsigned source_new(struct module* modul strcpy(module->sources + module->sources_used, full); module->sources_used += len; module->sources[module->sources_used] = '\0'; - if (full != name) HeapFree(GetProcessHeap(), 0, (char*)full); + HeapFree(GetProcessHeap(), 0, tmp); return ret; }