[gcc r17-2432] libgfortran: Don't quote ENV_PPID and ENV_BASE in caf/shmem/shared_memory.c

John David Anglin via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:f98e0692b35ddd0475f044d359b6947913d549d3

commit r17-2432-gf98e0692b35ddd0475f044d359b6947913d549d3
Author: John David Anglin <[email protected]>
Date:   Wed Jul 15 18:55:54 2026 -0400

    libgfortran: Don't quote ENV_PPID and ENV_BASE in caf/shmem/shared_memory.c
    
    ENV_PPID and ENV_BASE are declared previously as strings and they
    don't need to be quoted.
    
    2026-06-12  John David Anglin  <[email protected]>
    
    libgfortran/ChangeLog:
    
            * caf/shmem/shared_memory.c (shared_memory_set_env): Don't
            quote ENV_PPID.
            (shared_memory_init) Don't quote ENV_BASE.

Diff:
---
 libgfortran/caf/shmem/shared_memory.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgfortran/caf/shmem/shared_memory.c b/libgfortran/caf/shmem/shared_memory.c
index fc9bdfbd5581..6cf0c80eeb68 100644
--- a/libgfortran/caf/shmem/shared_memory.c
+++ b/libgfortran/caf/shmem/shared_memory.c
@@ -75,7 +75,7 @@ shared_memory_set_env (pid_t pid)
   int res;
 
   /* HP-UX / Legacy Fallback using putenv */
-  res = snprintf (buffer, 28, "%s=%d", "ENV_PPID", (int)pid);
+  res = snprintf (buffer, 28, "%s=%d", ENV_PPID, (int)pid);
   if (res != -1)
     putenv (buffer);
 #endif
@@ -268,7 +268,7 @@ shared_memory_init (shared_memory_act *mem, size_t size)
       int res;
 
       /* HP-UX / Legacy Fallback using putenv */
-      res = snprintf (buffer, 28, "%s=%p", "ENV_BASE", mem->glbl.base);
+      res = snprintf (buffer, 28, "%s=%p", ENV_BASE, mem->glbl.base);
       if (res != -1)
 	putenv (buffer);
 #endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.