From: Martin Mares Date: Sun, 5 Jan 2003 11:32:02 +0000 (+0000) Subject: When killing dots at the end of host name, remove _all_ of them, not just X-Git-Tag: holmes-import~1309 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=dc45796fd7712f0781c7f4ba7edf2a36b12c2faf;p=libucw.git When killing dots at the end of host name, remove _all_ of them, not just the last one. Without this, url_canonicalize on already believed to be canonic names wasn't constant which causes havoc in gatherd. --- diff --git a/lib/url.c b/lib/url.c index 0f4a5019..65f1c0aa 100644 --- a/lib/url.c +++ b/lib/url.c @@ -416,8 +416,8 @@ kill_end_dot(byte *b) if (b) { k = b + strlen(b) - 1; - if (k > b && *k == '.') - *k = 0; + while (k > b && *k == '.') + *k-- = 0; } }