correctly initialize error_code
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sat, 10 Sep 2011 09:57:17 +0000 (11:57 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sat, 10 Sep 2011 20:39:56 +0000 (22:39 +0200)
src/libpts/pts/pts.c

index 8be5ead..3cef545 100644 (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;
        }