Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sushi g/c some pointless malloc()s



details:   https://anonhg.NetBSD.org/src/rev/cd3bb457afd3
branches:  trunk
changeset: 534414:cd3bb457afd3
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Thu Jul 25 12:39:26 2002 +0000

description:
g/c some pointless malloc()s

diffstat:

 usr.sbin/sushi/sushi.c |  9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diffs (27 lines):

diff -r 2a1b75d4e84f -r cd3bb457afd3 usr.sbin/sushi/sushi.c
--- a/usr.sbin/sushi/sushi.c    Thu Jul 25 12:34:09 2002 +0000
+++ b/usr.sbin/sushi/sushi.c    Thu Jul 25 12:39:26 2002 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: sushi.c,v 1.9 2001/02/20 23:57:50 cgd Exp $       */
+/*      $NetBSD: sushi.c,v 1.10 2002/07/25 12:39:26 jdolecek Exp $       */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -177,16 +177,11 @@
                searchpaths = (char **)malloc(sizeof(char *) * 6);
                if (searchpaths == NULL)
                        bailout("malloc: %s", strerror(errno));
-               for (i = 0; i < 4; i++) {
-                       searchpaths[i] = (char *)malloc(sizeof(char) *
-                           PATH_MAX);
-                       if (searchpaths[i] == NULL)
-                               bailout("malloc: %s", strerror(errno));
-               }
                searchpaths[0] = "/usr/share/sushi";
                searchpaths[1] = "/usr/pkg/share/sushi";
                searchpaths[2] = "/usr/X11R6/share/sushi";
                searchpaths[3] = "/etc/sushi";
+               i = 4;
        } else {
                searchpaths = (char **)malloc(sizeof(char *));
                if (searchpaths == NULL)



Home | Main Index | Thread Index | Old Index