]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/udev/collect/collect.c
Add SPDX license identifiers to source files under the GPL
[thirdparty/systemd.git] / src / udev / collect / collect.c
index 57dfb016f9bbc7fc62b57ea25b783432d47b46c0..7b5fdf50b7feeea9ef65700b7e1f4f16d6313e1a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Collect variables across events.
  *
@@ -102,7 +103,7 @@ static int prepare(char *dir, char *filename)
         if (lockf(fd,F_TLOCK,0) < 0) {
                 if (debug)
                         fprintf(stderr, "Lock taken, wait for %d seconds\n", UDEV_ALARM_TIMEOUT);
-                if (errno == EAGAIN || errno == EACCES) {
+                if (IN_SET(errno, EAGAIN, EACCES)) {
                         alarm(UDEV_ALARM_TIMEOUT);
                         lockf(fd, F_LOCK, 0);
                         if (debug)