dbghelp: Fix an uninitialized return value.
This commit is contained in:
parent
49a8bb0aa0
commit
daab2c114d
|
@ -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++] = '/';
|
||||
|
|
Loading…
Reference in New Issue