diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2005-04-02 12:41:17 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2005-04-02 12:41:17 +0000 |
commit | 201d65b7f623441f54ab304371c27389fdf47a4e (patch) | |
tree | c57512bfa0175c5f249c5a2ef47fa4021cc81f03 /usr.bin | |
parent | 7ce7d423133146945187305d90b2b4bf9cdb332f (diff) |
since ssh has xstrdup, use it instead of strdup+test. unbreaks -Werror build
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/scp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index da7872aa494..dd84bfdae7d 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/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" @@ -362,9 +362,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; |