From 68f3db77cf69d5f1c22d7b2bd91746fd2515df38 Mon Sep 17 00:00:00 2001 From: Janneke Nieuwenhuizen Date: Wed, 3 May 2023 18:39:28 +0200 Subject: [PATCH] core: Remove duplicate environment initialization. * src/mes.c (init): Remove envp parameter. Remove environment initialization. (main): Remove envp parameter. Update caller. --- src/mes.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mes.c b/src/mes.c index 8834447b..2c41049e 100644 --- a/src/mes.c +++ b/src/mes.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2016,2017,2018,2019,2020,2021 Jan (janneke) Nieuwenhuizen + * Copyright © 2016,2017,2018,2019,2020,2021,2023 Jan (janneke) Nieuwenhuizen * Copyright © 2021 W. J. van der Laan * * This file is part of GNU Mes. @@ -164,9 +164,8 @@ read_boot () /*:((internal)) */ } void -init (char **envp) +init () { - environ = envp; __execl_c_argv = malloc (1024 * sizeof (char *)); /* POSIX minimum: 4096 */ __gettimeofday_time = malloc (sizeof (struct timeval)); __get_internal_run_time_ts = malloc (sizeof (struct timespec)); @@ -189,9 +188,9 @@ init (char **envp) } int -main (int argc, char **argv, char **envp) +main (int argc, char **argv) { - init (envp); + init (); struct scm *a = mes_environment (argc, argv); a = mes_builtins (a);