diff --git a/lib/lwres/context.c b/lib/lwres/context.c index 18cccca840..fdea9c75a2 100644 --- a/lib/lwres/context.c +++ b/lib/lwres/context.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: context.c,v 1.25 2000/06/26 20:30:37 bwelling Exp $ */ +/* $Id: context.c,v 1.26 2000/07/07 19:10:00 bwelling Exp $ */ #include @@ -154,7 +154,7 @@ static void * lwres_malloc(void *arg, size_t len) { void *mem; - (void)arg; + UNUSED(arg); mem = malloc(len); if (mem == NULL) @@ -167,7 +167,7 @@ lwres_malloc(void *arg, size_t len) { static void lwres_free(void *arg, void *mem, size_t len) { - (void)arg; + UNUSED(arg); memset(mem, 0xa9, len); free(mem); @@ -207,7 +207,6 @@ lwres_context_sendrecv(lwres_context_t *ctx, { int ret; int ret2; - int flags; struct sockaddr_in sin; LWRES_SOCKADDR_LEN_T fromlen; fd_set readfds; @@ -232,22 +231,10 @@ lwres_context_sendrecv(lwres_context_t *ctx, return (LWRES_R_IOERROR); again: - flags = fcntl(ctx->sock, F_GETFL, 0); - flags |= O_NONBLOCK; - ret = fcntl(ctx->sock, F_SETFL, flags); - if (ret < 0) - return (LWRES_R_IOERROR); - FD_ZERO(&readfds); FD_SET(ctx->sock, &readfds); ret2 = select(ctx->sock + 1, &readfds, NULL, NULL, &timeout); - flags = fcntl(ctx->sock, F_GETFL, 0); - flags &= ~O_NONBLOCK; - ret = fcntl(ctx->sock, F_SETFL, flags); - if (ret < 0) - return (LWRES_R_IOERROR); - /* * What happened with select? */