[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch] ksh: remove silly optimization in assign_command()
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: [patch] ksh: remove silly optimization in assign_command()
- From: Alexey Dobriyan <adobriyan_(_at_)_gmail_(_dot_)_com>
- Date: Tue, 14 Mar 2006 20:32:49 +0300
Index: bin/ksh/syn.c
===================================================================
RCS file: /cvs/src/bin/ksh/syn.c,v
retrieving revision 1.23
diff -u -p -r1.23 syn.c
--- bin/ksh/syn.c 2005/12/11 20:31:21 1.23
+++ bin/ksh/syn.c 2006/03/14 16:38:48
@@ -777,14 +777,12 @@ compile(Source *s)
static int
assign_command(char *s)
{
- char c = *s;
-
if (Flag(FPOSIX) || !*s)
return 0;
- return (c == 'a' && strcmp(s, "alias") == 0) ||
- (c == 'e' && strcmp(s, "export") == 0) ||
- (c == 'r' && strcmp(s, "readonly") == 0) ||
- (c == 't' && strcmp(s, "typeset") == 0);
+ return (strcmp(s, "alias") == 0) ||
+ (strcmp(s, "export") == 0) ||
+ (strcmp(s, "readonly") == 0) ||
+ (strcmp(s, "typeset") == 0);
}
/* Check if we are in the middle of reading an alias */
Visit your host, monkey.org