1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 19:21:53 +03:00

test-clock: fix fd "leak"

CID #1352301.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2016-02-29 08:03:32 -05:00
parent 3113d885fe
commit fe4f8fd1d9

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[] = {