assorted code cleanup, while here anyway
This commit is contained in:
parent
d96229b205
commit
e52a2bb23f
6
main.c
6
main.c
@ -34,7 +34,7 @@
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.315 2016/08/04 20:31:01 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.316 2016/08/04 20:32:14 tg Exp $");
|
||||
|
||||
extern char **environ;
|
||||
|
||||
@ -1096,9 +1096,11 @@ reclaim(void)
|
||||
static void
|
||||
remove_temps(struct temp *tp)
|
||||
{
|
||||
for (; tp != NULL; tp = tp->next)
|
||||
while (tp) {
|
||||
if (tp->pid == procpid)
|
||||
unlink(tp->tffn);
|
||||
tp = tp->next;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
6
syn.c
6
syn.c
@ -23,7 +23,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/syn.c,v 1.113 2016/07/25 21:05:25 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/syn.c,v 1.114 2016/08/04 20:32:14 tg Exp $");
|
||||
|
||||
struct nesting_state {
|
||||
int start_token; /* token than began nesting (eg, FOR) */
|
||||
@ -964,9 +964,11 @@ assign_command(const char *s, bool docommand)
|
||||
static int
|
||||
inalias(struct source *s)
|
||||
{
|
||||
for (; s && s->type == SALIAS; s = s->next)
|
||||
while (s && s->type == SALIAS) {
|
||||
if (!(s->flags & SF_ALIASEND))
|
||||
return (1);
|
||||
s = s->next;
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user