/* Create a hostcache id string for the provided host + port, to be used by the DNS caching. Without alloc.  */
static void create_hostcache_id(const char *name, int port, char *ptr, size_t buflen)
/* Create a hostcache id string for the provided host + port, to be used by the DNS caching. Without alloc.  */
static void create_hostcache_id(const char *name, int port, char *ptr, size_t buflen)
{
  size_t len = strlen(name);
  if(len > (buflen - 7))
    len = buflen - 7;
  while(len--)
    *ptr++ = (char)TOLOWER(*name++);
  msnprintf(ptr, 7, ":%u", port);
}