summaryrefslogtreecommitdiffhomepage
path: root/proto-libevdev/ftnoir_protocol_libevdev.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-05-05 01:18:21 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-05-05 01:18:21 +0200
commit12f02a22684c63ddb7bfa5989626e45b8032b9cf (patch)
tree809bcdadeae7135ff07454572af3f9f98cafc708 /proto-libevdev/ftnoir_protocol_libevdev.cpp
parent0cb91608deac61c0b2d8d76d7a24445b8e45928d (diff)
proto/libevdev: fix build
Issue: #944
Diffstat (limited to 'proto-libevdev/ftnoir_protocol_libevdev.cpp')
-rw-r--r--proto-libevdev/ftnoir_protocol_libevdev.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/proto-libevdev/ftnoir_protocol_libevdev.cpp b/proto-libevdev/ftnoir_protocol_libevdev.cpp
index ba3c3fcb..00f5fd07 100644
--- a/proto-libevdev/ftnoir_protocol_libevdev.cpp
+++ b/proto-libevdev/ftnoir_protocol_libevdev.cpp
@@ -18,10 +18,10 @@
#define CHECK_LIBEVDEV(expr) \
do { \
- if ((int error = (expr)); error != 0) \
+ if (int error = (expr); error != 0) \
{ \
error_code = -error; \
- error_str = #expr; \
+ error_expr = #expr; \
goto fail; \
} \
} while (false)
@@ -37,7 +37,7 @@ evdev::evdev()
if (!dev)
{
error_code = errno;
- error_str = "libevdev_new();";
+ error_expr = "libevdev_new();";
goto fail;
}
@@ -123,7 +123,7 @@ module_status evdev::initialize()
char buf[128] {};
(void)strerror_r(errno, buf, sizeof(buf));
return error(QStringLiteral("libevdev call '%1' failed with error '%2' (%3)")
- .arg(error_str ? "<NULL>" : error_str, buf, error_code));
+ .arg(!error_expr ? "<NULL>" : error_expr, buf).arg(error_code));
}
else
return {};