Replace longs in ag_stats struct with size_t. Should help with #1158.
This commit is contained in:
parent
a539c8e788
commit
5516568a30
2 changed files with 5 additions and 5 deletions
|
|
@ -213,7 +213,7 @@ int main(int argc, char **argv) {
|
|||
double time_diff = ((long)stats.time_end.tv_sec * 1000000 + stats.time_end.tv_usec) -
|
||||
((long)stats.time_start.tv_sec * 1000000 + stats.time_start.tv_usec);
|
||||
time_diff /= 1000000;
|
||||
printf("%ld matches\n%ld files contained matches\n%ld files searched\n%ld bytes searched\n%f seconds\n",
|
||||
printf("%zu matches\n%zu files contained matches\n%zu files searched\n%zu bytes searched\n%f seconds\n",
|
||||
stats.total_matches, stats.total_file_matches, stats.total_files, stats.total_bytes, time_diff);
|
||||
pthread_mutex_destroy(&stats_mtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ typedef struct {
|
|||
} match_t;
|
||||
|
||||
typedef struct {
|
||||
long total_bytes;
|
||||
long total_files;
|
||||
long total_matches;
|
||||
long total_file_matches;
|
||||
size_t total_bytes;
|
||||
size_t total_files;
|
||||
size_t total_matches;
|
||||
size_t total_file_matches;
|
||||
struct timeval time_start;
|
||||
struct timeval time_end;
|
||||
} ag_stats;
|
||||
|
|
|
|||
Loading…
Reference in a new issue