From: James Peach Date: Sat, 19 May 2007 04:23:04 +0000 (+0000) Subject: r23009: Both contains a strchr_m(server,'/') few lines after replacing all / with \. X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~407 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=04b84baef344206d97776e04a25f4bd214eea28f;p=thirdparty%2Fsamba.git r23009: Both contains a strchr_m(server,'/') few lines after replacing all / with \. This patch removes this dead code. Patch from Pascal Terjan for bug #2313. --- diff --git a/source/utils/smbcacls.c b/source/utils/smbcacls.c index 67de8c73355..5717df2dfaf 100644 --- a/source/utils/smbcacls.c +++ b/source/utils/smbcacls.c @@ -902,11 +902,8 @@ static struct cli_state *connect_one(const char *share) fstrcpy(server,path+2); share = strchr_m(server,'\\'); if (!share) { - share = strchr_m(server,'/'); - if (!share) { - printf("Invalid argument: %s\n", share); - return -1; - } + printf("Invalid argument: %s\n", share); + return -1; } *share = 0; diff --git a/source/utils/smbcquotas.c b/source/utils/smbcquotas.c index 40f4a86f96b..ae2e6a5956f 100644 --- a/source/utils/smbcquotas.c +++ b/source/utils/smbcquotas.c @@ -500,11 +500,8 @@ FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", "SETSTRING" }, pstrcpy(server,path+2); share = strchr_m(server,'\\'); if (!share) { - share = strchr_m(server,'/'); - if (!share) { - printf("Invalid argument: %s\n", share); - exit(EXIT_PARSE_ERROR); - } + printf("Invalid argument: %s\n", share); + exit(EXIT_PARSE_ERROR); } *share = 0;