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>
|
#include <locale.h>
|
||||||
#endif
|
#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;
|
extern char **environ;
|
||||||
|
|
||||||
@ -1096,9 +1096,11 @@ reclaim(void)
|
|||||||
static void
|
static void
|
||||||
remove_temps(struct temp *tp)
|
remove_temps(struct temp *tp)
|
||||||
{
|
{
|
||||||
for (; tp != NULL; tp = tp->next)
|
while (tp) {
|
||||||
if (tp->pid == procpid)
|
if (tp->pid == procpid)
|
||||||
unlink(tp->tffn);
|
unlink(tp->tffn);
|
||||||
|
tp = tp->next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
6
syn.c
6
syn.c
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#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 {
|
struct nesting_state {
|
||||||
int start_token; /* token than began nesting (eg, FOR) */
|
int start_token; /* token than began nesting (eg, FOR) */
|
||||||
@ -964,9 +964,11 @@ assign_command(const char *s, bool docommand)
|
|||||||
static int
|
static int
|
||||||
inalias(struct source *s)
|
inalias(struct source *s)
|
||||||
{
|
{
|
||||||
for (; s && s->type == SALIAS; s = s->next)
|
while (s && s->type == SALIAS) {
|
||||||
if (!(s->flags & SF_ALIASEND))
|
if (!(s->flags & SF_ALIASEND))
|
||||||
return (1);
|
return (1);
|
||||||
|
s = s->next;
|
||||||
|
}
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user