Mercurial > gftp.yaz
diff lib/protocols.c @ 518:c6a6e908dbaf
2004-7-27 Brian Masney <masneyb@gftp.org>
* lib/protocols.c lib/rfc2068.c lib/rfc959.c lib/sshv2.c
src/gtk/bookmarks.c src/gtk/dnd.c src/gtk/gftp-gtk.c src/gtk/gtui.c
src/gtk/menu-items.c src/misc-gtk.c src/gtk/options_dialog.c
src/gtk/transfer.c src/text/gftp-text.c src/uicommon/gftpui.c -
various fixes found through a static code analysis. (some
signed/unsigned fixes, removed unneeded casts, indentation fixes,
added static declaration to some functions)
| author | masneyb |
|---|---|
| date | Wed, 28 Jul 2004 01:37:15 +0000 |
| parents | fbb5a02beddb |
| children | e67a52327b24 |
line wrap: on
line diff
--- a/lib/protocols.c Tue Jul 27 20:43:39 2004 +0000 +++ b/lib/protocols.c Wed Jul 28 01:37:15 2004 +0000 @@ -339,7 +339,7 @@ } -mode_t +mode_t /* FIXME - this is unsigned, can return negative */ gftp_stat_filename (gftp_request * request, const char *filename) { mode_t ret; @@ -705,8 +705,9 @@ { char *pos, *endpos, *endhostpos, tempchar, *default_protocol, *stpos; gftp_logging_func logging_function; - int len, i, init_ret; const char *cpos; + int i, init_ret; + size_t len; g_return_val_if_fail (request != NULL, GFTP_EFATAL); g_return_val_if_fail (url != NULL, GFTP_EFATAL); @@ -1041,7 +1042,7 @@ static int gftp_need_proxy (gftp_request * request, char *service, char *proxy_hostname, - int proxy_port) + unsigned int proxy_port) { gftp_config_list_vars * proxy_hosts; gftp_proxy_hosts * hostname; @@ -2501,7 +2502,8 @@ errno = 0; ret = 0; - do + + while (1) { FD_ZERO (&fset); FD_SET (fd, &fset); @@ -2535,7 +2537,7 @@ break; else continue; - } + } if (request != NULL) { @@ -2546,8 +2548,8 @@ } return (GFTP_ERETRYABLE); } + break; } - while (errno == EINTR && !(request != NULL && request->cancel)); if (errno == EINTR && request != NULL && request->cancel) {
