sed: fix EOF value assumption

* sed/sed.c (main): Don’t assume EOF == -1; it’s not required
by either POSIX or C.
This commit is contained in:
Paul Eggert committed 2026-08-17 01:17:23 -07:00
1 parent 156efe87ae
commit 49336f7e4b
1 file changed
+1 -1
+1 -1
View File
@@ -260,7 +260,7 @@ main (int argc, char **argv)
lcmd_out_line_len = t-1;
}
while ((opt = getopt_long (argc, argv, SHORTOPTS, longopts, NULL)) != EOF)
while ((opt = getopt_long (argc, argv, SHORTOPTS, longopts, NULL)) != -1)
{
switch (opt)
{