Skip to content

Commit

Permalink
Compile fix (-Werror=unused-but-set-variable warnings)
Browse files Browse the repository at this point in the history
Assertion is no-longer needed after a conversion from sprintf() to
snprintf().
  • Loading branch information
toofishes authored and dustin committed Jul 8, 2011
1 parent c60ca35 commit bb9d00f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions items.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,7 @@ void do_item_stats_sizes(ADD_STAT add_stats, void *c) {
for (i = 0; i < num_buckets; i++) {
if (histogram[i] != 0) {
char key[8];
int klen = 0;
klen = snprintf(key, sizeof(key), "%d", i * 32);
assert(klen < sizeof(key));
snprintf(key, sizeof(key), "%d", i * 32);
APPEND_STAT(key, "%u", histogram[i]);
}
}
Expand Down

0 comments on commit bb9d00f

Please sign in to comment.