summaryrefslogtreecommitdiff
path: root/udp.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2016-04-18 15:02:38 +0200
committerLinus Nordberg <linus@nordu.net>2016-09-21 12:17:52 +0200
commit5acfcb4c7ce94482660dedb710e0b1f2ab8e5578 (patch)
tree92624c1abeb9274fc14e1174a6eb86cddce9f9b9 /udp.c
parent6c1f37d727afb31ac3fa4af4a4158993897d402d (diff)
Stomp less on other threads memory.
See RADSECPROXY-64.
Diffstat (limited to 'udp.c')
-rw-r--r--udp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/udp.c b/udp.c
index ff7ad77..dec3667 100644
--- a/udp.c
+++ b/udp.c
@@ -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)) {