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

Remove unnecessary sh.defpathlist variable (re: e3a1dda9) (#461)

src/cmd/ksh93/{sh/path.c,include/shell.h}:
- The sh.defpathlist variable is never set once, which makes every
  use of this variable unnecessary (as it's always null). This
  commit removes sh.defpathlist while also fixing a possible memory
  leak (there was another location where defpathinit() was invoked
  without saving the returned pointer, causing a memory leak).
This commit is contained in:
Johnothan King 2022-02-12 20:25:12 -08:00 committed by Martijn Dekker
parent 4886463bb6
commit 5bd18322e0
2 changed files with 6 additions and 19 deletions

View file

@ -349,7 +349,6 @@ struct Shell_s
void *lex_context;
void *arg_context;
void *pathlist;
void *defpathlist;
void *cdpathlist;
char **argaddr;
char cond_expan; /* set while processing ${var=val}, ${var:=val}, ${var?err}, ${var:?err} */