From: Adam Sutton Date: Wed, 30 Apr 2014 21:30:18 +0000 (+0100) Subject: tcp: minor correction to avoid GCC warnings about type aliasing X-Git-Tag: v4.1~2122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fbe7a7eb73d05fd279ac2b977af0409c7e75dd3;p=thirdparty%2Ftvheadend.git tcp: minor correction to avoid GCC warnings about type aliasing --- diff --git a/src/tcp.c b/src/tcp.c index ee003a193..89cedf2a6 100644 --- a/src/tcp.c +++ b/src/tcp.c @@ -492,8 +492,7 @@ tcp_server_loop(void *aux) if (r == 0) continue; - ts = ev.data.ptr; - if (ts == (tcp_server_t *)&tcp_server_pipe) { + if (ev.data.ptr == &tcp_server_pipe) { r = read(tcp_server_pipe.rd, &c, 1); if (r > 0) { pthread_mutex_lock(&global_lock); @@ -509,6 +508,8 @@ tcp_server_loop(void *aux) continue; } + ts = ev.data.ptr; + if(ev.events & TVHPOLL_HUP) { close(ts->serverfd); free(ts);