]> andersk Git - openssh.git/commitdiff
- djm@cvs.openbsd.org 2005/04/02 12:41:16
authordjm <djm>
Sun, 3 Apr 2005 00:16:39 +0000 (00:16 +0000)
committerdjm <djm>
Sun, 3 Apr 2005 00:16:39 +0000 (00:16 +0000)
     [scp.c]
     since ssh has xstrdup, use it instead of strdup+test. unbreaks -Werror
     build

ChangeLog
scp.c

index f988cd8f1035cc17cd7d7eafcf48554c336e0d2c..ed2e61fc54bb3005a3571fb4ce0415de14c771a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,10 @@
    - 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
diff --git a/scp.c b/scp.c
index dcea1946bde2b75b49c7dfd88e3eb3a20165d582..1d34cc63938a7f1355a042367b4499825dde32b2 100644 (file)
--- 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;
This page took 0.429549 seconds and 5 git commands to generate.