wmbiff: Use unsigned data type for port number.
This commit is contained in:
		
							parent
							
								
									cd4985a5cb
								
							
						
					
					
						commit
						2bea3d42e0
					
				
					 2 changed files with 6 additions and 5 deletions
				
			
		| 
						 | 
					@ -18,6 +18,7 @@
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
 | 
					#include <stdint.h>
 | 
				
			||||||
#include <sys/time.h>
 | 
					#include <sys/time.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef HAVE_GCRYPT_H
 | 
					#ifdef HAVE_GCRYPT_H
 | 
				
			||||||
| 
						 | 
					@ -78,8 +79,8 @@ typedef struct _mbox_t {
 | 
				
			||||||
			char password[BUF_SMALL];
 | 
								char password[BUF_SMALL];
 | 
				
			||||||
			char userName[BUF_BIG];
 | 
								char userName[BUF_BIG];
 | 
				
			||||||
			char serverName[BUF_BIG];
 | 
								char serverName[BUF_BIG];
 | 
				
			||||||
			int serverPort;
 | 
								uint16_t serverPort;
 | 
				
			||||||
			int localPort;
 | 
								uint16_t localPort;
 | 
				
			||||||
			char authList[100];
 | 
								char authList[100];
 | 
				
			||||||
			unsigned int dossl:1;	/* use tls. */
 | 
								unsigned int dossl:1;	/* use tls. */
 | 
				
			||||||
			/* prompt the user if we can't login / password is empty */
 | 
								/* prompt the user if we can't login / password is empty */
 | 
				
			||||||
| 
						 | 
					@ -113,7 +114,7 @@ int shellCreate( /*@notnull@ */ Pop3 pc, const char *str);
 | 
				
			||||||
int mboxCreate( /*@notnull@ */ Pop3 pc, const char *str);
 | 
					int mboxCreate( /*@notnull@ */ Pop3 pc, const char *str);
 | 
				
			||||||
int maildirCreate( /*@notnull@ */ Pop3 pc, const char *str);
 | 
					int maildirCreate( /*@notnull@ */ Pop3 pc, const char *str);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int sock_connect(const char *hostname, int port);
 | 
					int sock_connect(const char *hostname, uint16_t port);
 | 
				
			||||||
FILE *openMailbox(Pop3 pc, const char *mbox_filename);
 | 
					FILE *openMailbox(Pop3 pc, const char *mbox_filename);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* backtickExpand returns null on failure */
 | 
					/* backtickExpand returns null on failure */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -48,7 +48,7 @@ static int sanity_check_hostname(const char *hostname)
 | 
				
			||||||
			|| inet_aton(hostname, &dummy));
 | 
								|| inet_aton(hostname, &dummy));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int ipv4_sock_connect(struct in_addr *address, short port)
 | 
					static int ipv4_sock_connect(struct in_addr *address, uint16_t port)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct sockaddr_in addr;
 | 
						struct sockaddr_in addr;
 | 
				
			||||||
	int fd, i;
 | 
						int fd, i;
 | 
				
			||||||
| 
						 | 
					@ -82,7 +82,7 @@ static int ipv4_sock_connect(struct in_addr *address, short port)
 | 
				
			||||||
/* 1 June 2002; incorporated IPv6 support by
 | 
					/* 1 June 2002; incorporated IPv6 support by
 | 
				
			||||||
   Jun-ichiro itojun Hagino <itojun@iijlab.net>, thanks! */
 | 
					   Jun-ichiro itojun Hagino <itojun@iijlab.net>, thanks! */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int sock_connect(const char *hostname, int port)
 | 
					int sock_connect(const char *hostname, uint16_t port)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef HAVE_GETADDRINFO
 | 
					#ifdef HAVE_GETADDRINFO
 | 
				
			||||||
	struct addrinfo hints, *res, *res0;
 | 
						struct addrinfo hints, *res, *res0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue