X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=clients%2Fms_thread.c;h=5c387d0ee76303b0fa2dd289bcfd32a6d3f84e24;hb=7f9bc55d79a4e7133fdeaaa1150451717c103b28;hp=af856366c345ddea87ddbc9f2fd0a7693155d92c;hpb=ad624f93ee91351c4f3839ca0dc1a9981644d391;p=awesomized%2Flibmemcached diff --git a/clients/ms_thread.c b/clients/ms_thread.c index af856366..5c387d0e 100644 --- a/clients/ms_thread.c +++ b/clients/ms_thread.c @@ -61,7 +61,7 @@ static void ms_check_sock_timeout(void) if (c->udp) { - time_diff= (int)(ms_thread->curr_time - c->start_time.tv_sec); + time_diff= (int)(ms_thread->curr_time - (rel_time_t)c->start_time.tv_sec); /* wait time out */ if (time_diff > SOCK_WAIT_TIMEOUT) @@ -169,7 +169,7 @@ static int ms_set_thread_cpu_affinity(int cpu) */ static int ms_setup_thread(ms_thread_ctx_t *thread_ctx) { - + ms_thread_t *ms_thread= (ms_thread_t *)calloc(sizeof(*ms_thread), 1); pthread_setspecific(ms_thread_key, (void *)ms_thread);