udev-seat: Replace strncmp with streq for safety
authorduna.oh <duna.oh@samsung.com>
Fri, 30 Aug 2024 09:41:01 +0000 (18:41 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 4 Feb 2025 10:05:20 +0000 (19:05 +0900)
Change-Id: I80c8e93473571e99e34529ead31bd557a8d20495

src/udev-seat.c

index 52013e39e66fffdc1f56ad0bc7a214ec8ac2c580..8da98089fca874dd6f10459ad8215f369f16e35f 100644 (file)
@@ -341,7 +341,7 @@ udev_input_enable(struct libinput *libinput)
        }
 
        /* Skip only when the event source of udev monitor has been set as "udev" or null. */
-       if (!env || (0 == strncmp("udev", env, 4))) {
+       if (!env || strneq("udev", env, 4)) {
                _udev_monitor_skip_unconfigured_device = 1;
                log_info(libinput, "will skip addition of unconfigured devices. (env=%s)\n", env ? env : "null");
        }