From 8da4623f2274faa9e9d88f7d30babb9ea80fb141 Mon Sep 17 00:00:00 2001 From: Sachidananda Urs Date: Fri, 29 Jul 2011 16:26:03 +0530 Subject: 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 Reviewed-by: Anand Avati --- cli/src/cli.c | 20 -------------------- cli/src/cli.h | 2 -- 2 files changed, 22 deletions(-) diff --git a/cli/src/cli.c b/cli/src/cli.c index 0e904a15e45..e577cee1dc5 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 8919390b1da..30e6d6513ed 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); -- cgit