clean up chtypes use

This commit is contained in:
tg
2016-08-01 18:42:42 +00:00
parent 59619ee2ab
commit cc6857dfb6
2 changed files with 7 additions and 8 deletions

10
misc.c
View File

@ -30,7 +30,7 @@
#include <grp.h>
#endif
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.244 2016/07/25 20:36:28 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.245 2016/08/01 18:42:42 tg Exp $");
#define KSH_CHVT_FLAG
#ifdef MKSH_SMALL
@ -78,12 +78,12 @@ static int make_path(const char *, const char *, char **, XString *, int *);
void
setctypes(const char *s, int t)
{
unsigned int i;
if (t & C_IFS) {
for (i = 0; i < UCHAR_MAX + 1; i++)
unsigned int i = 0;
while (++i <= UCHAR_MAX)
chtypes[i] &= ~C_IFS;
/* include \0 in C_IFS */
/* include '\0' in C_IFS */
chtypes[0] |= C_IFS;
}
while (*s != 0)