Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/cron/dist Use setenv(3) instead of putenv(3) be...



details:   https://anonhg.NetBSD.org/src/rev/6b19921dd3b2
branches:  trunk
changeset: 757900:6b19921dd3b2
user:      tron <tron%NetBSD.org@localhost>
date:      Sat Oct 02 12:22:20 2010 +0000

description:
Use setenv(3) instead of putenv(3) because the later doesn't accept
string constants anymore.

diffstat:

 external/bsd/cron/dist/cron.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r a3b2f7641915 -r 6b19921dd3b2 external/bsd/cron/dist/cron.c
--- a/external/bsd/cron/dist/cron.c     Sat Oct 02 10:55:36 2010 +0000
+++ b/external/bsd/cron/dist/cron.c     Sat Oct 02 12:22:20 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cron.c,v 1.6 2010/05/18 21:49:51 christos Exp $        */
+/*     $NetBSD: cron.c,v 1.7 2010/10/02 12:22:20 tron Exp $    */
 
 /* Copyright 1988,1990,1993,1994 by Paul Vixie
  * All rights reserved
@@ -25,7 +25,7 @@
 #if 0
 static char rcsid[] = "Id: cron.c,v 1.12 2004/01/23 18:56:42 vixie Exp";
 #else
-__RCSID("$NetBSD: cron.c,v 1.6 2010/05/18 21:49:51 christos Exp $");
+__RCSID("$NetBSD: cron.c,v 1.7 2010/10/02 12:22:20 tron Exp $");
 #endif
 #endif
 
@@ -93,7 +93,7 @@
        set_cron_uid();
        set_cron_cwd();
 
-       if (putenv("PATH="_PATH_DEFPATH) < 0) {
+       if (setenv("PATH", _PATH_DEFPATH, 1) < 0) {
                log_it("CRON", getpid(), "DEATH", "can't malloc");
                exit(1);
        }



Home | Main Index | Thread Index | Old Index