commit 4e28261d344ccc1d8732379ed36b87f6041d538c from: Omar Polo date: Fri May 27 13:50:26 2022 UTC get rid of some ifdefs just declare the same function in the two branches of #if HAVE_ASR_RUN to avoid further #ifs commit - 12b8028458880ff002c13e2fc82398e6358ffdb6 commit + 4e28261d344ccc1d8732379ed36b87f6041d538c blob - ea5b155397272c815fe2fd0d0688748169ce037b blob + 8402ae48a7aeeb70a5f738e6aaf7afc04cac72fb --- net.c +++ net.c @@ -70,10 +70,8 @@ static void try_to_connect(int, short, void*); #if HAVE_ASR_RUN static void query_done(struct asr_result*, void*); -static void async_conn_towards(struct req*); -#else -static void blocking_conn_towards(struct req*); #endif +static void conn_towards(struct req*); static void close_with_err(struct req*, const char*); static void close_with_errf(struct req*, const char*, ...) @@ -256,7 +254,7 @@ query_done(struct asr_result *res, void *d) } static void -async_conn_towards(struct req *req) +conn_towards(struct req *req) { struct asr_query *q; const char *proto = "1965"; @@ -271,7 +269,7 @@ async_conn_towards(struct req *req) } #else static void -blocking_conn_towards(struct req *req) +conn_towards(struct req *req) { struct addrinfo hints; struct phos_uri *url = &req->url; @@ -675,11 +673,7 @@ handle_get_raw(struct imsg *imsg, size_t datalen) req->proto = r->proto; -#if HAVE_ASR_RUN - async_conn_towards(req); -#else - blocking_conn_towards(req); -#endif + conn_towards(req); } static void