[scp.c]
since ssh has xstrdup, use it instead of strdup+test. unbreaks -Werror
build
- deraadt@cvs.openbsd.org 2005/03/31 18:39:21
[scp.c]
copy argv[] element instead of smashing the one that ps will see; ok otto
+ - 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
20050331
- (dtucker) OpenBSD CVS Sync
*/
#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"
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;