[Pkg-wmaker-commits] [wmbiff] 02/04: wmbiff: Use unsigned data type for port number.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Dec 1 12:17:43 UTC 2016


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch upstream
in repository wmbiff.

commit bedb6dc2ead15d87bcd2fa86c93f92412a654b8b
Author: Doug Torrance <dtorrance at piedmont.edu>
Date:   Wed Nov 30 21:16:45 2016 -0500

    wmbiff: Use unsigned data type for port number.
---
 wmbiff/Client.h | 7 ++++---
 wmbiff/socket.c | 4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/wmbiff/Client.h b/wmbiff/Client.h
index b3a048c..cd89496 100644
--- a/wmbiff/Client.h
+++ b/wmbiff/Client.h
@@ -18,6 +18,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <sys/time.h>
 
 #ifdef HAVE_GCRYPT_H
@@ -78,8 +79,8 @@ typedef struct _mbox_t {
 			char password[BUF_SMALL];
 			char userName[BUF_BIG];
 			char serverName[BUF_BIG];
-			int serverPort;
-			int localPort;
+			uint16_t serverPort;
+			uint16_t localPort;
 			char authList[100];
 			unsigned int dossl:1;	/* use tls. */
 			/* 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 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);
 
 /* backtickExpand returns null on failure */
diff --git a/wmbiff/socket.c b/wmbiff/socket.c
index 7f7a9ec..87d0732 100644
--- a/wmbiff/socket.c
+++ b/wmbiff/socket.c
@@ -48,7 +48,7 @@ static int sanity_check_hostname(const char *hostname)
 			|| 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;
 	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
    Jun-ichiro itojun Hagino <itojun at iijlab.net>, thanks! */
 
-int sock_connect(const char *hostname, int port)
+int sock_connect(const char *hostname, uint16_t port)
 {
 #ifdef HAVE_GETADDRINFO
 	struct addrinfo hints, *res, *res0;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbiff.git



More information about the Pkg-wmaker-commits mailing list