diff options
author | Linus Nordberg <linus@nordu.net> | 2016-09-21 12:53:31 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2016-09-21 13:04:24 +0200 |
commit | e12e83b6f905fe6d27371921c36c5c3dad9e5379 (patch) | |
tree | 6360a09ea85ca4197d1677ff05d86d053cfbdf72 /udp.c | |
parent | 5acfcb4c7ce94482660dedb710e0b1f2ab8e5578 (diff) |
Don't cast int to pointer and back. Portability.stompless-rebased
Thanks to Fabian Mauchle for pointing this out.
Diffstat (limited to 'udp.c')
-rw-r--r-- | udp.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -258,11 +258,11 @@ int clientradputudp(struct server *server, unsigned char *rad) { void *udpclientrd(void *arg) { struct server *server; unsigned char *buf; - int s = (int) arg; + int *s = (int *)arg; for (;;) { server = NULL; - buf = radudpget(s, NULL, &server, NULL); + buf = radudpget(*s, NULL, &server, NULL); replyh(server, buf); } } @@ -348,10 +348,10 @@ void initextraudp() { } if (client4_sock >= 0) - if (pthread_create(&cl4th, &pthread_attr, udpclientrd, (void *) client4_sock)) + if (pthread_create(&cl4th, &pthread_attr, udpclientrd, (void *)&client4_sock)) debugx(1, DBG_ERR, "pthread_create failed"); if (client6_sock >= 0) - if (pthread_create(&cl6th, &pthread_attr, udpclientrd, (void *) client6_sock)) + if (pthread_create(&cl6th, &pthread_attr, udpclientrd, (void *)&client6_sock)) debugx(1, DBG_ERR, "pthread_create failed"); if (find_clconf_type(handle, NULL)) { |