fix 3 'var' might be used uninitialized warnings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14750 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -79,6 +79,7 @@ hookup (const char *host, int port)
|
|||||||
strlcpy (hostnamebuf, host, sizeof(hostnamebuf));
|
strlcpy (hostnamebuf, host, sizeof(hostnamebuf));
|
||||||
hostname = hostnamebuf;
|
hostname = hostnamebuf;
|
||||||
|
|
||||||
|
s = -1;
|
||||||
for (a = ai; a != NULL; a = a->ai_next) {
|
for (a = ai; a != NULL; a = a->ai_next) {
|
||||||
s = socket (a->ai_family, a->ai_socktype, a->ai_protocol);
|
s = socket (a->ai_family, a->ai_socktype, a->ai_protocol);
|
||||||
if (s < 0)
|
if (s < 0)
|
||||||
@@ -100,12 +101,13 @@ hookup (const char *host, int port)
|
|||||||
|
|
||||||
warn ("connect %s", addrstr);
|
warn ("connect %s", addrstr);
|
||||||
close (s);
|
close (s);
|
||||||
|
s = -1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
freeaddrinfo (ai);
|
freeaddrinfo (ai);
|
||||||
if (error < 0) {
|
if (s < 0) {
|
||||||
warnx ("failed to contact %s", host);
|
warnx ("failed to contact %s", host);
|
||||||
code = -1;
|
code = -1;
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -727,6 +729,8 @@ sendrequest (char *cmd, char *local, char *remote, char *lmode, int printnames)
|
|||||||
case TYPE_L:
|
case TYPE_L:
|
||||||
rc = lseek (fileno (fin), restart_point, SEEK_SET);
|
rc = lseek (fileno (fin), restart_point, SEEK_SET);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
warn ("local: %s", local);
|
warn ("local: %s", local);
|
||||||
@@ -859,7 +863,7 @@ void
|
|||||||
recvrequest (char *cmd, char *local, char *remote,
|
recvrequest (char *cmd, char *local, char *remote,
|
||||||
char *lmode, int printnames, int local_given)
|
char *lmode, int printnames, int local_given)
|
||||||
{
|
{
|
||||||
FILE *fout, *din = 0;
|
FILE *fout = NULL, *din = NULL;
|
||||||
int (*closefunc) (FILE *);
|
int (*closefunc) (FILE *);
|
||||||
sighand oldintr, oldintp;
|
sighand oldintr, oldintp;
|
||||||
int c, d, is_retr, tcrflag, bare_lfs = 0;
|
int c, d, is_retr, tcrflag, bare_lfs = 0;
|
||||||
@@ -1544,7 +1548,7 @@ abortpt (int sig)
|
|||||||
void
|
void
|
||||||
proxtrans (char *cmd, char *local, char *remote)
|
proxtrans (char *cmd, char *local, char *remote)
|
||||||
{
|
{
|
||||||
sighand oldintr;
|
sighand oldintr = NULL;
|
||||||
int secndflag = 0, prox_type, nfnd;
|
int secndflag = 0, prox_type, nfnd;
|
||||||
char *cmd2;
|
char *cmd2;
|
||||||
fd_set mask;
|
fd_set mask;
|
||||||
@@ -1616,6 +1620,7 @@ abort:
|
|||||||
pswitch (1);
|
pswitch (1);
|
||||||
if (ptabflg)
|
if (ptabflg)
|
||||||
code = -1;
|
code = -1;
|
||||||
|
if (oldintr)
|
||||||
signal (SIGINT, oldintr);
|
signal (SIGINT, oldintr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user