projects
/
parallel_computing.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aad743d
)
Don't print more elements than there are in src/sorting/main.c:printlist.
author
W. Trevor King
<wking@drexel.edu>
Tue, 26 Oct 2010 14:15:21 +0000
(10:15 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Tue, 26 Oct 2010 14:15:21 +0000
(10:15 -0400)
src/sorting/main.c
patch
|
blob
|
history
diff --git
a/src/sorting/main.c
b/src/sorting/main.c
index d8c3e35fb32536bb959622b8463296e199ba2c2b..624638435e55ab5b5e5d2fb94769025c821167c6 100644
(file)
--- a/
src/sorting/main.c
+++ b/
src/sorting/main.c
@@
-17,6
+17,8
@@
void printlist(FILE * stream, int list_size, double *list, int num_shown)
{
int i;
if (num_shown > 0) {
+ if (num_shown > list_size/2)
+ num_shown = list_size/2;
for (i = 0; i < num_shown; i++)
fprintf(stream, "%g\t", list[i]);
fprintf(stream, "...\n...\t");