summaryrefslogtreecommitdiffstats
path: root/scp.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2005-04-03 02:16:39 +0200
committerDamien Miller <djm@mindrot.org>2005-04-03 02:16:39 +0200
commit4942de57199424734567879dacad61c00e96ffab (patch)
tree54c4e9679a20136d323ed44006877a0c59d57e77 /scp.c
parent - deraadt@cvs.openbsd.org 2005/03/31 18:39:21 (diff)
downloadopenssh-4942de57199424734567879dacad61c00e96ffab.tar.xz
openssh-4942de57199424734567879dacad61c00e96ffab.zip
- djm@cvs.openbsd.org 2005/04/02 12:41:16
[scp.c] since ssh has xstrdup, use it instead of strdup+test. unbreaks -Werror build
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/scp.c b/scp.c
index dcea1946b..1d34cc639 100644
--- a/scp.c
+++ b/scp.c
@@ -71,7 +71,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.120 2005/03/31 18:39:21 deraadt Exp $");
+RCSID("$OpenBSD: scp.c,v 1.121 2005/04/02 12:41:16 djm Exp $");
#include "xmalloc.h"
#include "atomicio.h"
@@ -367,9 +367,7 @@ toremote(char *targ, int argc, char **argv)
if (*targ == 0)
targ = ".";
- arg = strdup(argv[argc - 1]);
- if (!arg)
- err(1, "malloc");
+ arg = xstrdup(argv[argc - 1]);
if ((thost = strrchr(arg, '@'))) {
/* user@host */
*thost++ = 0;