diff options
author | ewt <devnull@localhost> | 1996-08-08 17:34:05 +0000 |
---|---|---|
committer | ewt <devnull@localhost> | 1996-08-08 17:34:05 +0000 |
commit | fd31424fd3bd5abff9d79b5f9a3638957a5ad6a1 (patch) | |
tree | 8ca781cb3967c3e9ab7cdf47a336af8b409687dd /ftp.c | |
parent | 6768a41feb80cef1e1798775eb463abb7410fff0 (diff) | |
download | rpm-fd31424fd3bd5abff9d79b5f9a3638957a5ad6a1.tar.gz rpm-fd31424fd3bd5abff9d79b5f9a3638957a5ad6a1.tar.bz2 rpm-fd31424fd3bd5abff9d79b5f9a3638957a5ad6a1.zip |
fixed sscanf() to use proper types
CVS patchset: 948
CVS date: 1996/08/08 17:34:05
Diffstat (limited to 'ftp.c')
-rw-r--r-- | ftp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -267,7 +267,7 @@ int ftpReadData(int sock, int out) { int ftpGetFile(int sock, char * remotename, int dest) { int dataSocket; struct sockaddr_in dataAddress; - int i; + int i, j; char * passReply; char * chptr; char * retrCommand; @@ -299,10 +299,10 @@ int ftpGetFile(int sock, char * remotename, int dest) { port number portion */ dataAddress.sin_family = AF_INET; - if (sscanf(chptr, "%d,%d", (int *) &dataAddress.sin_port, &i) != 2) { + if (sscanf(chptr, "%d,%d", &i, &j) != 2) { return FTPERR_PASSIVE_ERROR; } - dataAddress.sin_port = htons((dataAddress.sin_port << 8) + i); + dataAddress.sin_port = htons((i << 8) + j); chptr = passReply; while (*chptr++) { |