inetd: comment tweak. no code changes
[oweals/busybox.git] / editors / awk.c
index 89ce2cfc81e9d39045c92067c1ca911ca8d06a72..cef73342c2d71a03f3590309a2e5a2d5c0c2cec7 100644 (file)
@@ -521,8 +521,8 @@ static void zero_out_var(var * vp)
        memset(vp, 0, sizeof(*vp));
 }
 
-static void syntax_error(const char *const message) NORETURN;
-static void syntax_error(const char *const message)
+static void syntax_error(const char *message) NORETURN;
+static void syntax_error(const char *message)
 {
        bb_error_msg_and_die("%s:%i: %s", g_progname, g_lineno, message);
 }
@@ -1571,13 +1571,14 @@ static int awk_split(const char *s, node *spl, char **slist)
                                n++; /* we saw yet another delimiter */
                        } else {
                                pmatch[0].rm_eo = l;
-                               if (s[l]) pmatch[0].rm_eo++;
+                               if (s[l])
+                                       pmatch[0].rm_eo++;
                        }
                        memcpy(s1, s, l);
                        /* make sure we remove *all* of the separator chars */
-                       while (l < pmatch[0].rm_eo) {
-                               s1[l++] = '\0';
-                       }
+                       do {
+                               s1[l] = '\0';
+                       } while (++l < pmatch[0].rm_eo);
                        nextword(&s1);
                        s += pmatch[0].rm_eo;
                } while (*s);