Make suffix_mult structures const. Thanks to Vladimir N. Oleynik.
[oweals/busybox.git] / sed.c
diff --git a/sed.c b/sed.c
index e0351c3b80f6ae3029b68a4450467728a26dbc4d..0ce9f45e0b527cf6e62e3f6bd73a58dcbf06d94c 100644 (file)
--- a/sed.c
+++ b/sed.c
@@ -436,8 +436,7 @@ static void load_cmd_file(char *filename)
                }
                /* eat trailing newline (if any) --if I don't do this, edit commands
                 * (aic) will print an extra newline */
-               if (line[strlen(line)-1] == '\n')
-                       line[strlen(line)-1] = 0;
+               chomp(line);
                add_cmd_str(line);
                free(line);
        }