summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorJose A. Rivera <jarrpa@redhat.com>2014-01-24 10:00:02 -0600
committerAnand Avati <avati@redhat.com>2014-01-24 23:46:48 -0800
commitc0ac21222383315b9fe84ac7c0afdf01e3ecef7b (patch)
tree1ab6184c6430bcf0486030b73c30b144573318ab /api
parent8814fdafab377139cdf3863096234f4d5b6e543e (diff)
libgfapi: Remove useless call to lstat
There's no need to lstat cmd_args->volfile, since we already check to see if fopen fails. The error message was largely the same. BUG: 789278 CID: 1124869 Change-Id: I10827154b32c72d2e4a1ab0d3c1e464f8af6ffee Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-on: http://review.gluster.org/6783 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'api')
-rw-r--r--api/src/glfs.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c
index 2b4312eac3a..174076e390f 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -214,20 +214,11 @@ err:
static FILE *
get_volfp (struct glfs *fs)
{
- int ret = 0;
cmd_args_t *cmd_args = NULL;
FILE *specfp = NULL;
- struct stat statbuf;
cmd_args = &fs->ctx->cmd_args;
- ret = lstat (cmd_args->volfile, &statbuf);
- if (ret == -1) {
- gf_log ("glfs", GF_LOG_ERROR,
- "%s: %s", cmd_args->volfile, strerror (errno));
- return NULL;
- }
-
if ((specfp = fopen (cmd_args->volfile, "r")) == NULL) {
gf_log ("glfs", GF_LOG_ERROR,
"volume file %s: %s",