summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachidananda <sac@gluster.com>2009-11-03 08:38:25 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-11-03 06:48:54 -0800
commit2a62b1748edcb8319e6ce36e72717c8154635db6 (patch)
tree24e1bf1c51f4186b6cd812ee042bfb538dcd8768
parentc1aa64729130aab9b58925871768d6c9c7d6a4ba (diff)
Wrong variable is checked after stat call.
Signed-off-by: Sachidananda <sac@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 355 (Wrong variable checked after a stat call) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=355
-rw-r--r--xlators/storage/posix/src/posix.c4
1 files changed, 2 insertions, 2 deletions
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);