diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2010-01-08 21:50:50 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2010-01-08 21:50:50 +0000 |
commit | 7ec564029b2d8795f5249a3ae71d1754aa79df85 (patch) | |
tree | 0ab661a62f4d7fc1ff0a217b1dfac68e26543618 /usr.bin | |
parent | 8846d57d1a4ac194841c83abd7fded2818af49b8 (diff) |
Fix two warnings: possibly used unitialized and use a nul byte instead of
NULL pointer. ok djm@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/sftp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index d4a16e62113..20e71ee0296 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/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> * @@ -1544,7 +1544,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; } } @@ -2014,7 +2014,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; |