gbranden pushed a commit to branch master
in repository groff.

commit 95cedcfd9a6dd055893f7a43b039eb99b6cc58bf
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Mar 15 18:39:54 2026 -0500

    Refactor: migrate putenv(3) -> setenv(3) (2d/3).
    
    * src/roff/groff/groff.cpp: Refactor: migrate from putenv(3) to
      setenv(3) (4/4).
    
      (xputenv): Drop no-longer-used function.
---
 ChangeLog                | 6 ++++++
 src/roff/groff/groff.cpp | 8 +-------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 527a88559..47a67a8da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-03-15  G. Branden Robinson <[email protected]>
+
+       * src/roff/groff/groff.cpp: Refactor: migrate from putenv(3) to
+       setenv(3) (4/4).
+       (xputenv): Drop no-longer-used function.
+
 2026-03-15  G. Branden Robinson <[email protected]>
 
        * src/roff/groff/groff.cpp: Refactor: migrate from putenv(3) to
diff --git a/src/roff/groff/groff.cpp b/src/roff/groff/groff.cpp
index 2a2bfded4..d9a02974a 100644
--- a/src/roff/groff/groff.cpp
+++ b/src/roff/groff/groff.cpp
@@ -26,7 +26,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>. */
 #include <assert.h>
 #include <errno.h>
 #include <stdio.h> // EOF, FILE, fflush(), setbuf(), stderr, stdout
-#include <stdlib.h> // exit(), EXIT_SUCCESS, free(), getenv(), putenv(), 
setenv()
+#include <stdlib.h> // exit(), EXIT_SUCCESS, free(), getenv(), setenv()
 #include <string.h> // strerror(), strsignal()
 
 #include <getopt.h> // getopt_long()
@@ -129,12 +129,6 @@ static char *xstrdup(const char *s) {
   return str;
 }
 
-static void xputenv(const char *s) {
-  if (putenv(const_cast<char *>(s)) != 0)
-    fatal("cannot update process environment: %1", strerror(errno));
-  return;
-}
-
 static void xsetenv(const char *name, const char *value, int overwrite)
 {
   if (setenv(name, value, overwrite) != 0)

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to