From 2a4dd9c28f663c1ef410d6430aaa3fe90085bf6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 16 Nov 2023 23:08:30 +0100 Subject: [PATCH] Cleanup --- src/linux_joystick.c | 7 +++---- src/linux_joystick.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/linux_joystick.c b/src/linux_joystick.c index 5b2c3b34..78d867eb 100644 --- a/src/linux_joystick.c +++ b/src/linux_joystick.c @@ -326,9 +326,8 @@ GLFWbool _glfwInitJoysticksLinux(void) // Continue without device connection notifications if inotify fails - _glfw.linjs.regex_compiled = regcomp(&_glfw.linjs.regex, - "^event[0-9]\\+$", 0) == 0; - if (!_glfw.linjs.regex_compiled) + _glfw.linjs.regexCompiled = (regcomp(&_glfw.linjs.regex, "^event[0-9]\\+$", 0) == 0); + if (!_glfw.linjs.regexCompiled) { _glfwInputError(GLFW_PLATFORM_ERROR, "Linux: Failed to compile regex"); return GLFW_FALSE; @@ -382,7 +381,7 @@ void _glfwTerminateJoysticksLinux(void) close(_glfw.linjs.inotify); } - if (_glfw.linjs.regex_compiled) + if (_glfw.linjs.regexCompiled) regfree(&_glfw.linjs.regex); } diff --git a/src/linux_joystick.h b/src/linux_joystick.h index 3e1fe8c8..64462b04 100644 --- a/src/linux_joystick.h +++ b/src/linux_joystick.h @@ -50,7 +50,7 @@ typedef struct _GLFWlibraryLinux int inotify; int watch; regex_t regex; - GLFWbool regex_compiled; + GLFWbool regexCompiled; GLFWbool dropped; } _GLFWlibraryLinux;