From cf8fd42c7707baf638c2519b4151ac249ddbc0e3 Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Sat, 10 Sep 2011 11:57:17 +0200 Subject: [PATCH] correctly initialize error_code --- src/libpts/pts/pts.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libpts/pts/pts.c b/src/libpts/pts/pts.c index 8be5ead..3cef545 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; } -- 2.7.4