1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-10 17:57:40 +03:00

Merge pull request #2766 from keszybz/coverity

test-clock: fix fd "leak"
This commit is contained in:
Martin Pitt 2016-02-29 15:19:10 +01:00
commit 450e89f6b1

View File

@ -20,17 +20,18 @@
#include <unistd.h>
#include <fcntl.h>
#include "macro.h"
#include "clock-util.h"
#include "fd-util.h"
#include "fileio.h"
#include "log.h"
#include "clock-util.h"
#include "macro.h"
static void test_clock_is_localtime(void) {
char adjtime[] = "/tmp/test-adjtime.XXXXXX";
int fd;
_cleanup_close_ int fd = -1;
FILE* f;
const struct scenario {
static const struct scenario {
const char* contents;
int expected_result;
} scenarios[] = {