firstHostColon = strchr(firstHost.get(), ':');
firstHostColon = (char *)strchr(firstHost.get(), ':');
cookie_isForeign (char * curURL, char * firstURL, nsIIOService* ioService) {  if (!firstURL) {    return PR_FALSE;  }  nsCAutoString curHost, firstHost;  nsresult rv;  NS_ASSERTION(ioService, "IOService not available");  // Get hosts  rv = ioService->ExtractUrlPart(nsDependentCString(curURL),                                 nsIIOService::url_Host |                                 nsIIOService::url_Port,                                 curHost);  if (NS_FAILED(rv)) {    return PR_FALSE;  }  rv = ioService->ExtractUrlPart(nsDependentCString(firstURL),                                 nsIIOService::url_Host |                                 nsIIOService::url_Port,                                 firstHost);  if (NS_FAILED(rv)) {    return PR_FALSE;  }  char * curHostColon = 0;  char * firstHostColon = 0;  /* strip ports */  curHostColon = strchr(curHost.get(), ':');  if(curHostColon) {    *curHostColon = '\0';  }  firstHostColon = strchr(firstHost.get(), ':');  if(firstHostColon) {    *firstHostColon = '\0';  }  /* determine if it's foreign */  PRBool retval = (!cookie_SameDomain((char*)curHost.get(), (char*)firstHost.get()));  /* clean up our garbage and return */  if(curHostColon) {    *curHostColon = ':';  }  if(firstHostColon) {    *firstHostColon = ':';  }  return retval;}