include/SAFE_IOCTL() fix return value type
PATCH 1/1 include/SAFE_IOCTL() fix return value type
This adds the same trick we use for SAFE_FCNTL() to SAFE_IOCTL(), the added coma + zero forces the return value to be numeric in all cases so that compiler will work fine in cases that we want to store the resulting value from SAFE_IOCTL().
Signed-off-by Cyril Hrubis <[email protected]>
CC Federico Bonfiglio <[email protected]>
--- include/tst_safe_macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/tst_safe_macros.h +1 -1
@@ -221,7 +221,7 @@ pid_t safe_getpgid(const char *file, const int lineno, pid_t pid); ({int tst_ret_ = ioctl(fd, request, ##__VA_ARGS__); \ tst_ret_ <0 ? \ tst_brk(TBROK | TERRNO, \ - "ioctl(%i,%s,...) failed", fd, #request) \ + "ioctl(%i,%s,...) failed", fd, #request), 0 \ : tst_ret_;})#define SAFE_FCNTL (fd, cmd, ...) \
Signature · 1 line
2.19.2