rem: *soap->endpoint = '\0'; *soap->host = '\0'; *soap->path = '\0';
add: soap->endpoint[0] = '\0'; soap->host[0] = '\0'; soap->path[0] = '/'; soap->path[1] = '\0';
context: soap_set_endpoint(struct soap *soap, const char *endpoint){ register const char *s;  register size_t i, n;  *soap->endpoint = '\0';  *soap->host = '\0';  *soap->path = '\0';  soap->port = 80;  if (!endpoint || !*endpoint)    return;#ifdef WITH_OPENSSL  if (!strncmp(endpoint, "https:", 6))    soap->port = 443;#endif  strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint) - 1);  s = strchr(endpoint, ':');  if (s && s[1] == '/' && s[2] == '/')    s += 3;  else    s = endpoint;  n = strlen(s);  if (n >= sizeof(soap->host))    n = sizeof(soap->host) - 1;/* WR[ */#ifdef WITH_IPV6  if ('[' == s[0])  { s++;    for (i = 0; i < n; i++)    { soap->host[i] = s[i];      if (']' == s[i])      {        s++;        break;       }    }  }  else  { for (i = 0; i < n; i++)    { soap->host[i] = s[i];      if (s[i] == '/' || s[i] == ':')        break;     }  }#else /* WITH_IPV6 *//* ]WR */  for (i = 0; i < n; i++)  { soap->host[i] = s[i];    if (s[i] == '/' || s[i] == ':')      break;   }/* WR[ */#endif /* WITH_IPV6 *//* ]WR */  soap->host[i] = '\0';  if (s[i] == ':')  { soap->port = (int)atol(s + i + 1);    for (i++; i < n; i++)      if (s[i] == '/')        break;  }  if (s[i])  { strncpy(soap->path, s + i + 1, sizeof(soap->path));    soap->path[sizeof(soap->path) - 1] = '\0';  }}