diff options
Diffstat (limited to 'api/src/glfs.c')
-rw-r--r-- | api/src/glfs.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c index 1bae78d23..174076e39 100644 --- a/api/src/glfs.c +++ b/api/src/glfs.c @@ -68,6 +68,10 @@ glusterfs_ctx_defaults_init (glusterfs_ctx_t *ctx) xlator_mem_acct_init (THIS, glfs_mt_end + 1); + if (!ctx) { + goto err; + } + ctx->process_uuid = generate_glusterfs_ctx_id (); if (!ctx->process_uuid) { goto err; @@ -210,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", |