summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-01-12 22:43:14 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-01-12 22:43:14 +0000
commit337771650fe20f2661eed86c7594f5fe17503397 (patch)
treeb137455d750830823139e815928bad05946cea4d /mdk-stage1
parente3bbf82b82a5bba8b057fc68357ad9d47ac8389e (diff)
downloaddrakx-337771650fe20f2661eed86c7594f5fe17503397.tar
drakx-337771650fe20f2661eed86c7594f5fe17503397.tar.gz
drakx-337771650fe20f2661eed86c7594f5fe17503397.tar.bz2
drakx-337771650fe20f2661eed86c7594f5fe17503397.tar.xz
drakx-337771650fe20f2661eed86c7594f5fe17503397.zip
use strrchr instead of doing it by hand
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/url.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/mdk-stage1/url.c b/mdk-stage1/url.c
index 90bb43139..bbfff8464 100644
--- a/mdk-stage1/url.c
+++ b/mdk-stage1/url.c
@@ -336,12 +336,7 @@ static int ftp_get_filesize(int sock, char * remotename)
int i;
strcpy(buf, remotename);
- ptr = buf;
- while (*ptr)
- ptr++;
- ptr--;
- while (*ptr && *ptr != '/')
- ptr--;
+ ptr = strrchr(buf, '/');
if (!*ptr)
return -1;
*ptr = '\0';