lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


a small patch for lua-5.2.0-alpha, no functional change.

François
diff --git a/src/lua.c b/src/lua.c
index fe2f069..a5f6e56 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -106,13 +106,11 @@ static void laction (int i) {
 
 
 static void print_usage (const char *badoption) {
-  if (badoption[1] == 'e' || badoption[1] == 'l') {
-    luai_writestringerror("%s: ", progname);
+  luai_writestringerror("%s: ", progname);
+  if (badoption[1] == 'e' || badoption[1] == 'l')
     luai_writestringerror("'%s' needs argument\n", badoption);
-  } else {
-    luai_writestringerror("%s: ", progname);
+  else
     luai_writestringerror("unrecognized option '%s'\n", badoption);
-  }
   luai_writestringerror(
   "usage: %s [options] [script [args]]\n"
   "Available options are:\n"