Source-Changes-HG archive

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

[src/netbsd-1-6]: src/usr.sbin/pkg_install/lib Pullup rev 1.5 (requested by a...



details:   https://anonhg.NetBSD.org/src/rev/7e01cee2e716
branches:  netbsd-1-6
changeset: 530089:7e01cee2e716
user:      jmc <jmc%NetBSD.org@localhost>
date:      Sat Feb 08 07:53:25 2003 +0000

description:
Pullup rev 1.5 (requested by abs in ticket #1141)
 Catchup to -current as of version 20030202.

diffstat:

 usr.sbin/pkg_install/lib/path.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (75 lines):

diff -r fb7e0ed560d6 -r 7e01cee2e716 usr.sbin/pkg_install/lib/path.c
--- a/usr.sbin/pkg_install/lib/path.c   Sat Feb 08 07:53:10 2003 +0000
+++ b/usr.sbin/pkg_install/lib/path.c   Sat Feb 08 07:53:25 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: path.c,v 1.1.2.5 2002/11/24 22:23:49 tron Exp $        */
+/*     $NetBSD: path.c,v 1.1.2.6 2003/02/08 07:53:25 jmc Exp $ */
 
 /*-
  * Copyright (c)2002 YAMAMOTO Takashi,
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: path.c,v 1.1.2.5 2002/11/24 22:23:49 tron Exp $");
+__RCSID("$NetBSD: path.c,v 1.1.2.6 2003/02/08 07:53:25 jmc Exp $");
 #endif
 
 #include <err.h>
@@ -107,7 +107,7 @@
 
        new = malloc(sizeof(*new));
        if (new == NULL)
-               err(1, "path_create");
+               err(EXIT_FAILURE, "path_create");
 
        if (!IS_FULLPATH(cp) && !IS_URL(cp)) {
                /* this is a relative path */
@@ -116,18 +116,18 @@
                size_t cwdlen;
 
                if (getcwd(cwd, sizeof(cwd)) == NULL)
-                       err(1, "getcwd");
+                       err(EXIT_FAILURE, "getcwd");
                cwdlen = strlen(cwd);
                total = cwdlen + 1 + len + 1;
                new->pl_path = malloc(total);
                if (new->pl_path == NULL)
-                       err(1, "path_create");
+                       err(EXIT_FAILURE, "path_create");
                snprintf(new->pl_path, total, "%s/%*.*s", cwd, (int)len, (int)len, cp);
        }
        else {
                new->pl_path = malloc(len + 1);
                if (new->pl_path == NULL)
-                       err(1, "path_create");
+                       err(EXIT_FAILURE, "path_create");
                memcpy(new->pl_path, cp, len);
                new->pl_path[len] = '\0';
        }
@@ -177,7 +177,7 @@
 
        env = malloc(len);
        if (env == NULL)
-               err(1, "path_setenv");
+               err(EXIT_FAILURE, "path_setenv");
 
        env0 = env;
        envend = env + len;
@@ -187,7 +187,7 @@
 
                r = snprintf(env, envend - env, "%s%s", sep, p->pl_path);
                if (r < 0 || r >= envend - env)
-                       err(1, "snprintf");
+                       err(EXIT_FAILURE, "snprintf");
                env += r;
                sep = ";";
        }
@@ -195,6 +195,6 @@
        if (Verbose)
                printf("%s = %s\n", envname, env0);
        if (setenv(envname, env0, 1) != 0)
-               err(1, "setenv");
+               err(EXIT_FAILURE, "setenv");
        free(env0);
 }



Home | Main Index | Thread Index | Old Index