summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachidananda Urs <sac@gluster.com>2011-07-29 16:26:03 +0530
committerAnand Avati <avati@gluster.com>2011-07-31 23:39:22 -0700
commit8da4623f2274faa9e9d88f7d30babb9ea80fb141 (patch)
tree1eec6d981e32fd194a68a4927f8422b4cc33f8cb
parentdf0a72d9c118c2a1146f2787eee6d5f0a58853f0 (diff)
Remove redundant function `cli_path_strip_trailing_slashes'.
Use cli_canonicalize_path instead, to remove trailing/duplicate slashes. Change-Id: Ie76267a4fa9ee9986cb36039afad4dfff830d5f8 BUG: 3183 Reviewed-on: http://review.gluster.com/124 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
-rw-r--r--cli/src/cli.c20
-rw-r--r--cli/src/cli.h2
2 files changed, 0 insertions, 22 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 0e904a15e..e577cee1d 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -634,26 +634,6 @@ out:
return ret;
}
-void
-cli_path_strip_trailing_slashes (char *path)
-{
- int i = 0;
- int len = 0;
-
- if (!path)
- return;
-
- len = strlen (path);
- for (i = len - 1; i > 0 ; i--) {
- if (path[i] != '/')
- break;
-
- }
-
- if (i < (len - 1))
- path[i + 1] = '\0';
-}
-
struct cli_state *global_state;
int
diff --git a/cli/src/cli.h b/cli/src/cli.h
index 8919390b1..30e6d6513 100644
--- a/cli/src/cli.h
+++ b/cli/src/cli.h
@@ -234,8 +234,6 @@ cli_cmd_broadcast_connected ();
int
cli_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
void *data);
-void
-cli_path_strip_trailing_slashes (char *path);
int
cli_canonicalize_path (char *path);