Module: wine Branch: master Commit: daab2c114d7acc50238167f2fe816ed5fd26cfed URL: http://source.winehq.org/git/wine.git/?a=commit;h=daab2c114d7acc50238167f2fe...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Jan 31 15:36:23 2011 +0100
dbghelp: Fix an uninitialized return value.
---
dlls/dbghelp/source.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/dbghelp/source.c b/dlls/dbghelp/source.c index a5bb86f..5f12b9f 100644 --- a/dlls/dbghelp/source.c +++ b/dlls/dbghelp/source.c @@ -87,11 +87,11 @@ static unsigned source_find(const char* name) */ unsigned source_new(struct module* module, const char* base, const char* name) { - unsigned ret; + unsigned ret = -1; const char* full; char* tmp = NULL;
- if (!name) return (unsigned)-1; + if (!name) return ret; if (!base || *name == '/') full = name; else @@ -99,7 +99,7 @@ unsigned source_new(struct module* module, const char* base, const char* name) unsigned bsz = strlen(base);
tmp = HeapAlloc(GetProcessHeap(), 0, bsz + 1 + strlen(name) + 1); - if (!tmp) return (unsigned)-1; + if (!tmp) return ret; full = tmp; strcpy(tmp, base); if (tmp[bsz - 1] != '/') tmp[bsz++] = '/';