1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

sh_main(): do not decrease null pointer

src/cmd/ksh93/sh/main.c: sh_main():
- Reading the code makes it obvious that the shp->comdiv-- decrease
  in the 'else' block is never reached unless that pointer is still
  null, in which case it makes no sense to decrease it. Must be
  some kind of missed leftover from old code. Remove the decrease.
This commit is contained in:
Martijn Dekker 2021-01-19 18:30:29 +00:00
parent de7eb85255
commit 82847bba3f

View file

@ -331,7 +331,6 @@ int sh_main(int ac, char *av[], Shinit_f userinit)
shp->readscript = shp->shname;
}
error_info.id = name;
shp->comdiv--;
#if SHOPT_ACCT
sh_accinit();
if(fdin != 0)