aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2017-08-01 10:48:47 +0200
committerAndreas Schneider <asn@samba.org>2017-09-07 07:57:19 +0200
commit03c06022e29e790938a1701a686ee2863677ff3c (patch)
tree450fed85a2d2f2ff1e299944d70ac5bc145003a5 /src
parent96c93cf0ff3f06b99cdf84a3270e7686a4c7a0d3 (diff)
downloadsocket_wrapper-03c06022e29e790938a1701a686ee2863677ff3c.tar.gz
socket_wrapper-03c06022e29e790938a1701a686ee2863677ff3c.tar.xz
socket_wrapper-03c06022e29e790938a1701a686ee2863677ff3c.zip
swrap: Improve argument handling for libc_vioctl()
The ioctl() only takes one or no argument. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'src')
-rw-r--r--src/socket_wrapper.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 04832e1..0a7dacf 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -822,22 +822,14 @@ static int libc_getsockopt(int sockfd,
DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE
static int libc_vioctl(int d, unsigned long int request, va_list ap)
{
- long int args[4];
+ void *arg;
int rc;
- int i;
swrap_bind_symbol_libc(ioctl);
- for (i = 0; i < 4; i++) {
- args[i] = va_arg(ap, long int);
- }
+ arg = va_arg(ap, void *);
- rc = swrap.libc.symbols._libc_ioctl.f(d,
- request,
- args[0],
- args[1],
- args[2],
- args[3]);
+ rc = swrap.libc.symbols._libc_ioctl.f(d, request, arg);
return rc;
}