Use NULL instead of nullptr

NULL is standard for long enough in POSIX to always be available,
while C23 introduced nullptr as a new constant, creating a conflict
here.
This commit is contained in:
Patrick Georgi
2025-09-23 21:15:22 +02:00
parent 5787ee456e
commit ef2c655f55

View File

@@ -1963,7 +1963,7 @@ int sh_exec(register const Shnode_t *t, int flags)
int flag = errorflg|OPTIMIZE_FLAG; int flag = errorflg|OPTIMIZE_FLAG;
struct dolnod *argsav=0; struct dolnod *argsav=0;
struct comnod *tp; struct comnod *tp;
char *cp, *trap, *nullptr = 0; char *cp, *trap;
int nameref, refresh=1; int nameref, refresh=1;
char *av[5]; char *av[5];
#if SHOPT_OPTIMIZE #if SHOPT_OPTIMIZE
@@ -2008,7 +2008,7 @@ int sh_exec(register const Shnode_t *t, int flags)
save_prompt = sh.nextprompt; save_prompt = sh.nextprompt;
sh.nextprompt = 3; sh.nextprompt = 3;
sh.timeout = 0; sh.timeout = 0;
sh.exitval=sh_readline(&nullptr,0,1,(size_t)0,1000*sh.st.tmout); sh.exitval=sh_readline(NULL,0,1,(size_t)0,1000*sh.st.tmout);
sh.nextprompt = save_prompt; sh.nextprompt = save_prompt;
if(sh.exitval||sfeof(sfstdin)||sferror(sfstdin)) if(sh.exitval||sfeof(sfstdin)||sferror(sfstdin))
{ {