From: Andreas Steffen Date: Sat, 10 Sep 2011 09:57:17 +0000 (+0200) Subject: correctly initialize error_code X-Git-Tag: 4.6.0~357 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf8fd42c7707baf638c2519b4151ac249ddbc0e3;p=thirdparty%2Fstrongswan.git correctly initialize error_code --- diff --git a/src/libpts/pts/pts.c b/src/libpts/pts/pts.c index 8be5ead1b0..3cef54555a 100644 --- a/src/libpts/pts/pts.c +++ b/src/libpts/pts/pts.c @@ -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; }