From: Simon Marchi Date: Wed, 31 Mar 2021 14:48:13 +0000 (-0400) Subject: Clean-up: kernel-ctl: rename local variables in LTTNG_IOCTL_{,NO_}CHECK X-Git-Tag: v2.13.0-rc1~141 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=9074be22cad1e15ff91ac1147158ce93a33f29ad Clean-up: kernel-ctl: rename local variables in LTTNG_IOCTL_{,NO_}CHECK Same rationale as previous patch. Change-Id: Ie1782adad99616b3705c015360fa31d7e9273718 Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/kernel-ctl/kernel-ctl.c b/src/common/kernel-ctl/kernel-ctl.c index 592e1a2f4..ff85b2c9b 100644 --- a/src/common/kernel-ctl/kernel-ctl.c +++ b/src/common/kernel-ctl/kernel-ctl.c @@ -22,16 +22,18 @@ #include "kernel-ctl.h" #include "kernel-ioctl.h" -#define LTTNG_IOCTL_CHECK(fildes, request, ...) ({ \ - int ret = ioctl(fildes, request, ##__VA_ARGS__);\ - assert(ret <= 0); \ - !ret ? 0 : -errno; \ -}) - -#define LTTNG_IOCTL_NO_CHECK(fildes, request, ...) ({ \ - int ret = ioctl(fildes, request, ##__VA_ARGS__);\ - ret >= 0 ? ret : -errno; \ -}) +#define LTTNG_IOCTL_CHECK(fildes, request, ...) \ + ({ \ + int _ioctl_ret = ioctl(fildes, request, ##__VA_ARGS__); \ + assert(_ioctl_ret <= 0); \ + !_ioctl_ret ? 0 : -errno; \ + }) + +#define LTTNG_IOCTL_NO_CHECK(fildes, request, ...) \ + ({ \ + int _ioctl_ret = ioctl(fildes, request, ##__VA_ARGS__); \ + _ioctl_ret >= 0 ? _ioctl_ret : -errno; \ + }) /* * This flag indicates which version of the kernel ABI to use. The old