Avoid using uninitialized variables
Modified: trunk/reactos/apps/utils/net/ftp/ftp.c
_____
Modified: trunk/reactos/apps/utils/net/ftp/ftp.c
--- trunk/reactos/apps/utils/net/ftp/ftp.c 2006-01-04 23:28:10 UTC
(rev 20564)
+++ trunk/reactos/apps/utils/net/ftp/ftp.c 2006-01-04 23:48:15 UTC
(rev 20565)
@@ -211,13 +211,16 @@
int n, aflag = 0;
user = pass = acct = 0;
- if (ruserpass(host, &puser, &ppass, &pacct) < 0) {
+ n = ruserpass(host, &puser, &ppass, &pacct);
+ if (n < 0) {
code = -1;
return(0);
}
- user = puser;
- pass = ppass;
- acct = pacct;
+ if (0 != n) {
+ user = puser;
+ pass = ppass;
+ acct = pacct;
+ }
while (user == NULL) {
const char *myname = "none"; // This needs to become the
usename env
Show replies by date