Merge pull request #12186 from poettering/lgtm-updates

lgtm ruleset updates
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-04-02 14:19:27 +02:00
committed by GitHub
2 changed files with 22 additions and 3 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <unistd.h>
#include <fcntl.h>
#include "sd-bus.h"
@@ -30,7 +31,7 @@ static int inhibit(sd_bus *bus, const char *what) {
assert_se(r >= 0);
assert_se(fd >= 0);
return dup(fd);
return fcntl(fd, F_DUPFD_CLOEXEC, 3);
}
static void print_inhibitors(sd_bus *bus) {