mirror of
https://git.busybox.net/busybox.git
synced 2024-11-27 15:43:26 +08:00
seq: exit on write errors
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
ad8def2d8a
commit
786635e62e
@ -86,7 +86,8 @@ int seq_main(int argc, char **argv)
|
||||
v = first;
|
||||
n = 0;
|
||||
while (increment >= 0 ? v <= last : v >= last) {
|
||||
printf("%s%0*.*f", sep, width, frac_part, v);
|
||||
if (printf("%s%0*.*f", sep, width, frac_part, v) < 0)
|
||||
break; /* I/O error, bail out (yes, this really happens) */
|
||||
sep = opt_s;
|
||||
/* v += increment; - would accumulate floating point errors */
|
||||
n++;
|
||||
|
Loading…
Reference in New Issue
Block a user