diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2001-01-12 22:43:14 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2001-01-12 22:43:14 +0000 |
commit | 337771650fe20f2661eed86c7594f5fe17503397 (patch) | |
tree | b137455d750830823139e815928bad05946cea4d /mdk-stage1 | |
parent | e3bbf82b82a5bba8b057fc68357ad9d47ac8389e (diff) | |
download | drakx-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.c | 7 |
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'; |