strcpy(tmpbuf, sep->s_name);
else
/* get port as a string */
- sprintf(tmpbuf, "%u", (unsigned short)ntohs(port));
+ sprintf(tmpbuf, "%u", (unsigned int)ntohs(port));
if (strlen(tmpbuf) < buflen)
/* return it if buffer big enough */
strcpy(buf, tmpbuf);
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
int *waitp)
{
#if defined(HAVE_GETHOSTBYNAME_R_3) || defined(HAVE_GETHOSTBYNAME_R_6)
- int res = ERANGE;
+ int res;
#endif
Curl_addrinfo *ai = NULL;
struct hostent *h = NULL;
addr = (struct sockaddr_in *)ai->ai_addr; /* storage area for this info */
memcpy((char *)&(addr->sin_addr), curr, sizeof(struct in_addr));
- addr->sin_family = he->h_addrtype;
+ addr->sin_family = (unsigned short)(he->h_addrtype);
addr->sin_port = htons((unsigned short)port);
prevai = ai;
state->state = TFTP_STATE_START;
((struct sockaddr *)&state->local_addr)->sa_family =
- conn->ip_addr->ai_family;
+ (unsigned short)(conn->ip_addr->ai_family);
tftp_set_timeouts(state);