diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-03-24 21:06:27 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-04-05 20:00:55 -0400 |
commit | 245802dd89ccf10de446faff5577e041d5372062 (patch) | |
tree | 30ffc96cbcfa09331168254df4b92f9fc5f558d7 /src/core | |
parent | c84a94883161073239c35d181e25823ff0454f68 (diff) |
Use _cleanup_ when reading config files
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/main.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/main.c b/src/core/main.c index 4d21dd97a3..921476a042 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -704,7 +704,7 @@ static int parse_config_file(void) { { NULL, NULL, NULL, 0, NULL } }; - FILE *f; + FILE _cleanup_fclose_ *f; const char *fn; int r; @@ -722,8 +722,6 @@ static int parse_config_file(void) { if (r < 0) log_warning("Failed to parse configuration file: %s", strerror(-r)); - fclose(f); - return 0; } |