From 2a62b1748edcb8319e6ce36e72717c8154635db6 Mon Sep 17 00:00:00 2001 From: Sachidananda Date: Tue, 3 Nov 2009 08:38:25 +0000 Subject: Wrong variable is checked after stat call. Signed-off-by: Sachidananda Signed-off-by: Anand V. Avati BUG: 355 (Wrong variable checked after a stat call) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=355 --- xlators/storage/posix/src/posix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/storage/posix') diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 26573b34a1c..5ef577910a5 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -4680,9 +4680,9 @@ init (xlator_t *this) umask (000); // umask `masking' is done at the client side - /* Check whether the specified directory exists, if not create it. */ + /* Check whether the specified directory exists, if not log it. */ op_ret = stat (dir_data->data, &buf); - if ((ret != 0) || !S_ISDIR (buf.st_mode)) { + if ((op_ret != 0) || !S_ISDIR (buf.st_mode)) { gf_log (this->name, GF_LOG_ERROR, "Directory '%s' doesn't exist, exiting.", dir_data->data); -- cgit