summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <>2012-05-18 08:45:32 +0000
committererdgeist <>2012-05-18 08:45:32 +0000
commit8e683affd108635c9c7ad9585086d6fff847f676 (patch)
tree3c9fe1dd71f53b3a7b050180d7a70ec4337fd51a
parent50b5c750cc01a1c14e7a1c159c96e7f3107b77f7 (diff)
Do not always grow the vector, shrink the first iovec to 0 before filling the second one
-rw-r--r--ot_stats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ot_stats.c b/ot_stats.c
index 010dec1..39b8d69 100644
--- a/ot_stats.c
+++ b/ot_stats.c
@@ -614,8 +614,8 @@ static void stats_make( int *iovec_entries, struct iovec **iovector, ot_tasktype
614 case TASK_STATS_SLASH24S: r += stats_slash24s_txt( r, 128 ); break; 614 case TASK_STATS_SLASH24S: r += stats_slash24s_txt( r, 128 ); break;
615 case TASK_STATS_TOP10: r += stats_top_txt( r, 10 ); break; 615 case TASK_STATS_TOP10: r += stats_top_txt( r, 10 ); break;
616 case TASK_STATS_TOP100: 616 case TASK_STATS_TOP100:
617 if( !( r = iovec_increase( iovec_entries, iovector, 4*OT_STATS_TMPSIZE ) ) ) 617 r = iovec_fix_increase_or_free( iovec_entries, iovector, r, 4 * OT_STATS_TMPSIZE );
618 return; 618 if( !r ) return;
619 r += stats_top_txt( r, 100 ); break; 619 r += stats_top_txt( r, 100 ); break;
620 case TASK_STATS_EVERYTHING: r += stats_return_everything( r ); break; 620 case TASK_STATS_EVERYTHING: r += stats_return_everything( r ); break;
621#ifdef WANT_SPOT_WOODPECKER 621#ifdef WANT_SPOT_WOODPECKER