diff options
author | Harshavardhana <harsha@harshavardhana.net> | 2013-07-18 18:43:37 -0700 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-08-03 09:52:14 -0700 |
commit | ed67d15fe174617c013078c37c4c87fdb119c2a4 (patch) | |
tree | 8de6fd9e5474f39b86e338d9a24515f0a777e535 /glusterfsd | |
parent | b777fc478d74b2582671fef7cb2c55206432c2bb (diff) |
glusterfsd: Cleanup in set_log_file_path()
1. Remove un-necessary tmp_ptr - volfile_id is true if volfile_server
is
2. port is not '1' as default instead its GF_DEFAULT_BASE_PORT
Change-Id: I3eab3f6ccce4b84724d25421002d2f25925ca72d
BUG: 846194
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/5344
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r-- | glusterfsd/src/glusterfsd.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 1bbe60d9ce0..695f456823d 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -1144,7 +1144,6 @@ set_log_file_path (cmd_args_t *cmd_args) int j = 0; int ret = 0; int port = 0; - char *tmp_ptr = NULL; char tmp_str[1024] = {0,}; if (cmd_args->mount_point) { @@ -1181,17 +1180,15 @@ set_log_file_path (cmd_args_t *cmd_args) } if (cmd_args->volfile_server) { - port = 1; - tmp_ptr = "default"; + port = GF_DEFAULT_BASE_PORT; if (cmd_args->volfile_server_port) port = cmd_args->volfile_server_port; - if (cmd_args->volfile_id) - tmp_ptr = cmd_args->volfile_id; ret = gf_asprintf (&cmd_args->log_file, DEFAULT_LOG_FILE_DIRECTORY "/%s-%s-%d.log", - cmd_args->volfile_server, tmp_ptr, port); + cmd_args->volfile_server, + cmd_args->volfile_id, port); } done: return ret; |