From: Lennart Poettering Date: Fri, 3 Aug 2018 14:48:53 +0000 (+0200) Subject: test-resolved: follow coding style, use fopen() with 'e' X-Git-Tag: v240~860^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7612719ef4d322bff9136e88518fee668c0c77e6;p=thirdparty%2Fsystemd.git test-resolved: follow coding style, use fopen() with 'e' --- diff --git a/src/resolve/test-resolved-etc-hosts.c b/src/resolve/test-resolved-etc-hosts.c index 5b8f1e220e3..b7dba0d7800 100644 --- a/src/resolve/test-resolved-etc-hosts.c +++ b/src/resolve/test-resolved-etc-hosts.c @@ -9,7 +9,7 @@ static void test_parse_etc_hosts_system(void) { _cleanup_fclose_ FILE *f = NULL; - f = fopen("/etc/hosts", "r"); + f = fopen("/etc/hosts", "re"); if (!f) { assert_se(errno == -ENOENT); return; @@ -27,7 +27,7 @@ static void test_parse_etc_hosts(const char *fname) { _cleanup_fclose_ FILE *f; if (fname) { - f = fopen(fname, "r"); + f = fopen(fname, "re"); assert_se(f); } else { fd = mkostemp_safe(t);