- 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
This commit is contained in:
parent
3dae15c611
commit
4942de5719
|
@ -3,6 +3,10 @@
|
||||||
- deraadt@cvs.openbsd.org 2005/03/31 18:39:21
|
- deraadt@cvs.openbsd.org 2005/03/31 18:39:21
|
||||||
[scp.c]
|
[scp.c]
|
||||||
copy argv[] element instead of smashing the one that ps will see; ok otto
|
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
|
20050331
|
||||||
- (dtucker) OpenBSD CVS Sync
|
- (dtucker) OpenBSD CVS Sync
|
||||||
|
@ -2414,4 +2418,4 @@
|
||||||
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
||||||
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.3735 2005/04/03 00:16:11 djm Exp $
|
$Id: ChangeLog,v 1.3736 2005/04/03 00:16:39 djm Exp $
|
||||||
|
|
6
scp.c
6
scp.c
|
@ -71,7 +71,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#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 "xmalloc.h"
|
||||||
#include "atomicio.h"
|
#include "atomicio.h"
|
||||||
|
@ -367,9 +367,7 @@ toremote(char *targ, int argc, char **argv)
|
||||||
if (*targ == 0)
|
if (*targ == 0)
|
||||||
targ = ".";
|
targ = ".";
|
||||||
|
|
||||||
arg = strdup(argv[argc - 1]);
|
arg = xstrdup(argv[argc - 1]);
|
||||||
if (!arg)
|
|
||||||
err(1, "malloc");
|
|
||||||
if ((thost = strrchr(arg, '@'))) {
|
if ((thost = strrchr(arg, '@'))) {
|
||||||
/* user@host */
|
/* user@host */
|
||||||
*thost++ = 0;
|
*thost++ = 0;
|
||||||
|
|
Loading…
Reference in New Issue