From 8831e41fbae38950c5c369dea6a545507f8fd5c1 Mon Sep 17 00:00:00 2001 From: Michael Tuexen <tuexen@fh-muenster.de> Date: Sat, 7 Oct 2017 12:01:10 +0200 Subject: [PATCH] Fix CID 187212 and CID 187186. --- gtests/net/packetdrill/run_system_call.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtests/net/packetdrill/run_system_call.c b/gtests/net/packetdrill/run_system_call.c index 53b0beb5..a9ac61bc 100644 --- a/gtests/net/packetdrill/run_system_call.c +++ b/gtests/net/packetdrill/run_system_call.c @@ -6523,9 +6523,9 @@ static int syscall_sctp_getpaddrs(struct state *state, struct syscall_spec *sysc goto error_out; } if (live_addr->sa_family == AF_INET) { - live_addr = (struct sockaddr *)((caddr_t*)live_addr) + sizeof(struct sockaddr_in); + live_addr = (struct sockaddr *)((caddr_t *)live_addr + sizeof(struct sockaddr_in)); } else if (live_addr->sa_family == AF_INET6) { - live_addr = (struct sockaddr *)((caddr_t*)live_addr) + sizeof(struct sockaddr_in6); + live_addr = (struct sockaddr *)((caddr_t *)live_addr + sizeof(struct sockaddr_in6)); } else { asprintf(error, "Bad Type of addrs[%d]", i); goto error_out; @@ -6608,9 +6608,9 @@ static int syscall_sctp_getladdrs(struct state *state, struct syscall_spec *sysc goto error_out; } if (live_addr->sa_family == AF_INET) { - live_addr = (struct sockaddr *)((caddr_t*)live_addr) + sizeof(struct sockaddr_in); + live_addr = (struct sockaddr *)((caddr_t *)live_addr + sizeof(struct sockaddr_in)); } else if (live_addr->sa_family == AF_INET6) { - live_addr = (struct sockaddr *)((caddr_t*)live_addr) + sizeof(struct sockaddr_in6); + live_addr = (struct sockaddr *)((caddr_t *)live_addr + sizeof(struct sockaddr_in6)); } else { asprintf(error, "Bad Type of addrs[%d]", i); goto error_out; -- GitLab