Commit daab2c11 authored by Alexandre Julliard's avatar Alexandre Julliard

dbghelp: Fix an uninitialized return value.

parent 49a8bb0a
...@@ -87,11 +87,11 @@ static unsigned source_find(const char* name) ...@@ -87,11 +87,11 @@ static unsigned source_find(const char* name)
*/ */
unsigned source_new(struct module* module, const char* base, const char* name) unsigned source_new(struct module* module, const char* base, const char* name)
{ {
unsigned ret; unsigned ret = -1;
const char* full; const char* full;
char* tmp = NULL; char* tmp = NULL;
if (!name) return (unsigned)-1; if (!name) return ret;
if (!base || *name == '/') if (!base || *name == '/')
full = name; full = name;
else else
...@@ -99,7 +99,7 @@ unsigned source_new(struct module* module, const char* base, const char* name) ...@@ -99,7 +99,7 @@ unsigned source_new(struct module* module, const char* base, const char* name)
unsigned bsz = strlen(base); unsigned bsz = strlen(base);
tmp = HeapAlloc(GetProcessHeap(), 0, bsz + 1 + strlen(name) + 1); tmp = HeapAlloc(GetProcessHeap(), 0, bsz + 1 + strlen(name) + 1);
if (!tmp) return (unsigned)-1; if (!tmp) return ret;
full = tmp; full = tmp;
strcpy(tmp, base); strcpy(tmp, base);
if (tmp[bsz - 1] != '/') tmp[bsz++] = '/'; if (tmp[bsz - 1] != '/') tmp[bsz++] = '/';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment