Browse Source

* matches.[ch] : add total hits counter

master
Alex 'AdUser' Z 8 years ago
parent
commit
b885001333
  1. 2
      src/matches.c
  2. 1
      src/matches.h

2
src/matches.c

@ -33,6 +33,8 @@ bool
f2b_matches_append(f2b_matches_t *m, time_t t) { f2b_matches_append(f2b_matches_t *m, time_t t) {
assert(m != NULL); assert(m != NULL);
m->hits++;
if (m->used >= m->max) if (m->used >= m->max)
return false; return false;

1
src/matches.h

@ -8,6 +8,7 @@
#define F2B_MATCHES_H_ #define F2B_MATCHES_H_
typedef struct { typedef struct {
size_t hits;
size_t max; size_t max;
size_t used; size_t used;
time_t *times; time_t *times;

Loading…
Cancel
Save