remove unused hashtable

This commit is contained in:
Quentin 2021-01-14 13:12:06 +01:00
parent 07b291efd9
commit ecab4c66d2

View file

@ -34,8 +34,6 @@ int streq(char* s1, char* s2) {
return strcmp(s1, s2) == 0; return strcmp(s1, s2) == 0;
} }
GHashTable* measurements;
struct evt_core_fdinfo* register_timer(struct evt_core_ctx* evts, struct measlat_ctx* mctx, struct measure_state* ms, struct timespec* next_tick) { struct evt_core_fdinfo* register_timer(struct evt_core_ctx* evts, struct measlat_ctx* mctx, struct measure_state* ms, struct timespec* next_tick) {
struct timespec now; struct timespec now;
struct itimerspec timer_config; struct itimerspec timer_config;
@ -467,8 +465,6 @@ int main(int argc, char** argv) {
setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0);
printf("~ measlat ~\n"); printf("~ measlat ~\n");
measurements = g_hash_table_new_full(g_int_hash, g_int_equal, NULL, free_ms);
int opt; int opt;
struct measlat_ctx mctx = {0}; struct measlat_ctx mctx = {0};
struct evt_core_ctx evts = {0}; struct evt_core_ctx evts = {0};
@ -542,10 +538,8 @@ int main(int argc, char** argv) {
// 5. Run main loop // 5. Run main loop
evt_core_loop(&evts); evt_core_loop(&evts);
g_hash_table_destroy (measurements);
return 0; return 0;
usage: usage:
g_hash_table_destroy (measurements);
fprintf(stderr, "Usage: %s [-h <host>] [-p <port>] [-l] [-r] [-t <udp|tor>] [-c <count>] [-i <ms>] [-s <bytes>]\n", argv[0]); fprintf(stderr, "Usage: %s [-h <host>] [-p <port>] [-l] [-r] [-t <udp|tor>] [-c <count>] [-i <ms>] [-s <bytes>]\n", argv[0]);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }