Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/ftp strdup -> xstrdup (handle malloc error right)



details:   https://anonhg.NetBSD.org/src/rev/14dc51331f6a
branches:  trunk
changeset: 533991:14dc51331f6a
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Jul 12 03:05:13 2002 +0000

description:
strdup -> xstrdup (handle malloc error right)

diffstat:

 usr.bin/ftp/cmds.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 48ffb828d1ff -r 14dc51331f6a usr.bin/ftp/cmds.c
--- a/usr.bin/ftp/cmds.c        Fri Jul 12 02:24:23 2002 +0000
+++ b/usr.bin/ftp/cmds.c        Fri Jul 12 03:05:13 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cmds.c,v 1.98 2002/06/05 10:20:46 lukem Exp $  */
+/*     $NetBSD: cmds.c,v 1.99 2002/07/12 03:05:13 itojun Exp $ */
 
 /*-
  * Copyright (c) 1996-2002 The NetBSD Foundation, Inc.
@@ -107,7 +107,7 @@
 #if 0
 static char sccsid[] = "@(#)cmds.c     8.6 (Berkeley) 10/9/94";
 #else
-__RCSID("$NetBSD: cmds.c,v 1.98 2002/06/05 10:20:46 lukem Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.99 2002/07/12 03:05:13 itojun Exp $");
 #endif
 #endif /* not lint */
 
@@ -1033,7 +1033,7 @@
                        gatemode = 0;
                else {
                        if (argc == 3)
-                               gateport = strdup(argv[2]);
+                               gateport = xstrdup(argv[2]);
                        (void)strlcpy(gsbuf, argv[1], sizeof(gsbuf));
                        gateserver = gsbuf;
                        gatemode = 1;



Home | Main Index | Thread Index | Old Index