fixed compiler warnings issued by:

gcc 4.3
	curl.h gcc type-checking
	glibc with enabled FORTIFY_SOURCE checking
This commit is contained in:
Martin Willi
2008-11-11 18:37:19 +00:00
parent 3d2dbebd70
commit 479f295049
22 changed files with 125 additions and 59 deletions
+13 -2
View File
@@ -576,11 +576,22 @@ static private_guest_t *guest_create_generic(char *parent, char *name,
if (*parent == '/' || getcwd(cwd, sizeof(cwd)) == NULL)
{
asprintf(&this->dirname, "%s/%s", parent, name);
if (asprintf(&this->dirname, "%s/%s", parent, name) < 0)
{
this->dirname = NULL;
}
}
else
{
asprintf(&this->dirname, "%s/%s/%s", cwd, parent, name);
if (asprintf(&this->dirname, "%s/%s/%s", cwd, parent, name) < 0)
{
this->dirname = NULL;
}
}
if (this->dirname == NULL)
{
free(this);
return NULL;
}
if (create)
{