]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-resolved: follow coding style, use fopen() with 'e'
authorLennart Poettering <lennart@poettering.net>
Fri, 3 Aug 2018 14:48:53 +0000 (16:48 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 3 Aug 2018 15:36:11 +0000 (17:36 +0200)
src/resolve/test-resolved-etc-hosts.c

index 5b8f1e220e3b6f2c95029f88472d8cbe1f11f9f4..b7dba0d7800b7f1c3ccb9356dc943ef4543bddc7 100644 (file)
@@ -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);