diff options
author | Damien Miller <djm@mindrot.org> | 2005-04-03 10:16:39 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2005-04-03 10:16:39 +1000 |
commit | 4942de57199424734567879dacad61c00e96ffab (patch) | |
tree | 54c4e9679a20136d323ed44006877a0c59d57e77 /scp.c | |
parent | 3dae15c6111a90a4a7417a34fa47a1cfee16963e (diff) |
- 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.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -71,7 +71,7 @@ | |||
71 | */ | 71 | */ |
72 | 72 | ||
73 | #include "includes.h" | 73 | #include "includes.h" |
74 | RCSID("$OpenBSD: scp.c,v 1.120 2005/03/31 18:39:21 deraadt Exp $"); | 74 | RCSID("$OpenBSD: scp.c,v 1.121 2005/04/02 12:41:16 djm Exp $"); |
75 | 75 | ||
76 | #include "xmalloc.h" | 76 | #include "xmalloc.h" |
77 | #include "atomicio.h" | 77 | #include "atomicio.h" |
@@ -367,9 +367,7 @@ toremote(char *targ, int argc, char **argv) | |||
367 | if (*targ == 0) | 367 | if (*targ == 0) |
368 | targ = "."; | 368 | targ = "."; |
369 | 369 | ||
370 | arg = strdup(argv[argc - 1]); | 370 | arg = xstrdup(argv[argc - 1]); |
371 | if (!arg) | ||
372 | err(1, "malloc"); | ||
373 | if ((thost = strrchr(arg, '@'))) { | 371 | if ((thost = strrchr(arg, '@'))) { |
374 | /* user@host */ | 372 | /* user@host */ |
375 | *thost++ = 0; | 373 | *thost++ = 0; |