Page MenuHomeFreeBSD

D43094.diff
No OneTemporary

D43094.diff

diff --git a/usr.bin/seq/seq.c b/usr.bin/seq/seq.c
--- a/usr.bin/seq/seq.c
+++ b/usr.bin/seq/seq.c
@@ -181,8 +181,9 @@
for (step = 1, cur = first; incr > 0 ? cur <= last : cur >= last;
cur = first + incr * step++) {
+ if (step > 1)
+ fputs(sep, stdout);
printf(fmt, cur);
- fputs(sep, stdout);
prev = cur;
}
@@ -202,15 +203,19 @@
}
if (strcmp(cur_print, last_print) == 0 &&
strcmp(cur_print, prev_print) != 0) {
- fputs(last_print, stdout);
fputs(sep, stdout);
+ fputs(last_print, stdout);
}
free(cur_print);
free(last_print);
free(prev_print);
- if (term != NULL)
+ if (term != NULL) {
+ fputs(sep, stdout);
fputs(term, stdout);
+ }
+
+ fputs("\n", stdout);
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 10, 9:42 PM (15 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15746957
Default Alt Text
D43094.diff (732 B)

Event Timeline