diff options
| author | Andreas Schneider <asn@samba.org> | 2017-08-01 10:20:46 +0200 |
|---|---|---|
| committer | Andreas Schneider <asn@samba.org> | 2017-09-07 07:57:15 +0200 |
| commit | 96c93cf0ff3f06b99cdf84a3270e7686a4c7a0d3 (patch) | |
| tree | 1e1f9e1cfc9a5eb937a0186e28863a3cdcbb5a5c /src | |
| parent | a886815fc1408382a7bf0ac056e7c7d99f494345 (diff) | |
| download | socket_wrapper-96c93cf0ff3f06b99cdf84a3270e7686a4c7a0d3.tar.gz socket_wrapper-96c93cf0ff3f06b99cdf84a3270e7686a4c7a0d3.tar.xz socket_wrapper-96c93cf0ff3f06b99cdf84a3270e7686a4c7a0d3.zip | |
swrap: Improve argument handling for libc_fcntl()
fcntl() has either 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.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index 11d708a..04832e1 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -774,22 +774,14 @@ static int libc_eventfd(int count, int flags) DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE static int libc_vfcntl(int fd, int cmd, va_list ap) { - long int args[4]; + void *arg; int rc; - int i; swrap_bind_symbol_libc(fcntl); - for (i = 0; i < 4; i++) { - args[i] = va_arg(ap, long int); - } + arg = va_arg(ap, void *); - rc = swrap.libc.symbols._libc_fcntl.f(fd, - cmd, - args[0], - args[1], - args[2], - args[3]); + rc = swrap.libc.symbols._libc_fcntl.f(fd, cmd, arg); return rc; } |
