X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Furl.c;h=30828c2a4b291f0cd76db7b1aab8daacbb20364a;hp=f97a31801ea5a6861fccc47b4a1d4d60632bf6b0;hb=c90e4f9c1a291e9d45ca0f473a3dd0d16a9319f8;hpb=aa07e689f2c03dd25342859e7e527a13467ad219 diff --git a/src/url.c b/src/url.c index f97a3180..30828c2a 100644 --- a/src/url.c +++ b/src/url.c @@ -1582,17 +1582,8 @@ path_end (const char *url) } /* Find the last occurrence of character C in the range [b, e), or - NULL, if none are present. We might want to use memrchr (a GNU - extension) under GNU libc. */ - -static const char * -find_last_char (const char *b, const char *e, char c) -{ - for (; e > b; e--) - if (*e == c) - return e; - return NULL; -} + NULL, if none are present. */ +#define find_last_char(b, e, c) memrchr ((b), (c), (e) - (b)) /* Merge BASE with LINK and return the resulting URI.