correctly initialize error_code

This commit is contained in:
Andreas Steffen 2011-09-10 11:57:17 +02:00
parent bf60354917
commit cf8fd42c77
1 changed files with 3 additions and 2 deletions

View File

@ -276,7 +276,7 @@ METHOD(pts_t, is_path_valid, bool, private_pts_t *this, char *path,
int error;
struct stat sb;
error_code = NULL;
*error_code = 0;
error = stat(path, &sb);
if (error == 0)
{
@ -294,7 +294,8 @@ METHOD(pts_t, is_path_valid, bool, private_pts_t *this, char *path,
}
else
{
DBG1(DBG_IMC, "error: %s occured while validating path: %s", strerror(error), path);
DBG1(DBG_IMC, "error: %s occured while validating path: %s",
strerror(error), path);
return FALSE;
}