diff lib/gftp.h @ 516:fbb5a02beddb

2004-7-26 Brian Masney <masneyb@gftp.org> * lib/config_file.c lib/local.c lib/ftps.c lib/gftp.h lib/httpcommon.h lib/https.c lib/misc.c lib/protocols.c lib/pty.c lib/rfc2068.c lib/rfc959.c lib/sshv2.c - various fixes found through a static code analysis checker. (some signed/unsigned fixes, removed unneeded casts, removed unneeded variables, more consistency, largefile fixes). Thanks to Derek M Jones for running the static code analysis for me * lib/cache.c - s/remove/del_entry/g * lib/bookmark.c lib/protocols.c (gftp_parse_bookmark) - allow the third parameter of this function to be a NULL pointer
author masneyb
date Tue, 27 Jul 2004 02:46:54 +0000
parents ba50a7085d93
children e67a52327b24
line wrap: on
line diff
--- a/lib/gftp.h	Mon Jul 26 09:51:07 2004 +0000
+++ b/lib/gftp.h	Tue Jul 27 02:46:54 2004 +0000
@@ -103,7 +103,7 @@
 
 #ifdef HAVE_GETADDRINFO
 #define HAVE_IPV6
-#define GFTP_GET_AI_FAMILY(request)	(request != NULL && request->hostp != NULL ? request->hostp->ai_family : -1)
+#define GFTP_GET_AI_FAMILY(request)	((request) != NULL && (request)->hostp != NULL ? (request)->hostp->ai_family : -1)
 #else
 #define GFTP_GET_AI_FAMILY(request)	AF_INET
 #endif
@@ -157,6 +157,12 @@
 # define GFTP_LOG_FUNCTION_ATTRIBUTES
 #endif
 
+#if defined (_LARGEFILE_SOURCE)
+#define GFTP_OFF_T_PRINTF_MOD	"%'lld"
+#else
+#define GFTP_OFF_T_PRINTF_MOD	"%'ld"
+#endif
+
 /* Server types (used by FTP protocol from SYST command) */
 #define GFTP_DIRTYPE_UNIX	1
 #define GFTP_DIRTYPE_EPLF	2
@@ -582,7 +588,7 @@
         *filename,              /* The xpm file to display */
         *view_program,          /* The program used to view this file */
         *ascii_binary;          /* Is this a ASCII transfer or a BINARY transfer */
-   int stlen;                   /* How long is the file extension. */
+   unsigned int stlen;          /* How long is the file extension. */
 } gftp_file_extensions;
 
 
@@ -957,7 +963,7 @@
 int gftp_connect_server 		( gftp_request * request, 
 					  char *service,
 					  char *proxy_hostname,
-					  int proxy_port );
+					  unsigned int proxy_port );
 
 #if !defined (HAVE_GETADDRINFO) || !defined (HAVE_GAI_STRERROR)