summaryrefslogtreecommitdiff
path: root/sftp.c
diff options
context:
space:
mode:
authordtucker <dtucker>2010-01-08 21:54:31 +0000
committerdtucker <dtucker>2010-01-08 21:54:31 +0000
commit194a946278d284669588b3c0af57ae5347c8b138 (patch)
tree44f74c7e44d624387b951471b99309b250a823b3 /sftp.c
parent455e23bb6de1995d07afd55c885d1a432fa5a657 (diff)
downloadopenssh-194a946278d284669588b3c0af57ae5347c8b138.tar.gz
- dtucker@cvs.openbsd.org 2010/01/08 21:50:49
[sftp.c] Fix two warnings: possibly used unitialized and use a nul byte instead of NULL pointer. ok djm@
Diffstat (limited to 'sftp.c')
-rw-r--r--sftp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sftp.c b/sftp.c
index 4b12fae4..9f5fa354 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.116 2010/01/04 02:03:57 djm Exp $ */
+/* $OpenBSD: sftp.c,v 1.117 2010/01/08 21:50:49 dtucker Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -1568,7 +1568,7 @@ complete_ambiguous(const char *word, char **list, size_t count)
if (matchlen > strlen(word)) {
char *tmp = xstrdup(list[0]);
- tmp[matchlen] = NULL;
+ tmp[matchlen] = '\0';
return tmp;
}
}
@@ -2062,7 +2062,7 @@ int
main(int argc, char **argv)
{
int in, out, ch, err;
- char *host, *userhost, *cp, *file2 = NULL;
+ char *host = NULL, *userhost, *cp, *file2 = NULL;
int debug_level = 0, sshver = 2;
char *file1 = NULL, *sftp_server = NULL;
char *ssh_program = _PATH_SSH_PROGRAM, *sftp_direct = NULL;