From df6dc5f8a78edaf5a533142b66b535881d2378f6 Mon Sep 17 00:00:00 2001 From: tholo Date: Wed, 30 Apr 1997 05:50:17 +0000 Subject: [PATCH] Don't do pointer arithmetic on void pointers --- lib/libc/rpc/svc_tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c index fd3e09749f9..75380fb16f6 100644 --- a/lib/libc/rpc/svc_tcp.c +++ b/lib/libc/rpc/svc_tcp.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: svc_tcp.c,v 1.13 1997/03/29 06:09:58 deraadt Exp $"; +static char *rcsid = "$OpenBSD: svc_tcp.c,v 1.14 1997/04/30 05:50:17 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -259,7 +259,7 @@ rendezvous_request(xprt) if (!getsockopt(sock, IPPROTO_IP, IP_OPTIONS, (char *)&opts, &optsize) && optsize != 0) { - for (i = 0; (void *)&opts.ipopt_list[i] - (void *)&opts < + for (i = 0; (char *)&opts.ipopt_list[i] - (char *)&opts < optsize; ) { u_char c = (u_char)opts.ipopt_list[i]; if (c == IPOPT_LSRR || c == IPOPT_SSRR) { -- 2.20.1