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));
|
||||
hostname = hostnamebuf;
|
||||
|
||||
s = -1;
|
||||
for (a = ai; a != NULL; a = a->ai_next) {
|
||||
s = socket (a->ai_family, a->ai_socktype, a->ai_protocol);
|
||||
if (s < 0)
|
||||
@@ -100,12 +101,13 @@ hookup (const char *host, int port)
|
||||
|
||||
warn ("connect %s", addrstr);
|
||||
close (s);
|
||||
s = -1;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
freeaddrinfo (ai);
|
||||
if (error < 0) {
|
||||
if (s < 0) {
|
||||
warnx ("failed to contact %s", host);
|
||||
code = -1;
|
||||
return NULL;
|
||||
@@ -727,6 +729,8 @@ sendrequest (char *cmd, char *local, char *remote, char *lmode, int printnames)
|
||||
case TYPE_L:
|
||||
rc = lseek (fileno (fin), restart_point, SEEK_SET);
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
if (rc < 0) {
|
||||
warn ("local: %s", local);
|
||||
@@ -859,7 +863,7 @@ void
|
||||
recvrequest (char *cmd, char *local, char *remote,
|
||||
char *lmode, int printnames, int local_given)
|
||||
{
|
||||
FILE *fout, *din = 0;
|
||||
FILE *fout = NULL, *din = NULL;
|
||||
int (*closefunc) (FILE *);
|
||||
sighand oldintr, oldintp;
|
||||
int c, d, is_retr, tcrflag, bare_lfs = 0;
|
||||
@@ -1544,7 +1548,7 @@ abortpt (int sig)
|
||||
void
|
||||
proxtrans (char *cmd, char *local, char *remote)
|
||||
{
|
||||
sighand oldintr;
|
||||
sighand oldintr = NULL;
|
||||
int secndflag = 0, prox_type, nfnd;
|
||||
char *cmd2;
|
||||
fd_set mask;
|
||||
@@ -1616,7 +1620,8 @@ abort:
|
||||
pswitch (1);
|
||||
if (ptabflg)
|
||||
code = -1;
|
||||
signal (SIGINT, oldintr);
|
||||
if (oldintr)
|
||||
signal (SIGINT, oldintr);
|
||||
return;
|
||||
}
|
||||
if (cpend)
|
||||
|
Reference in New Issue
Block a user