diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-08 22:20:22 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-13 08:56:44 -0400 |
commit | 78e334b50f12a3ef386fb5de03d0549fa853c692 (patch) | |
tree | 975b79ccda731585d9bc56a2ef0baa830d833dc2 /src/core/machine-id-setup.c | |
parent | 025ef1d2264b24e77283d312dede8af01fa050f6 (diff) |
basic/util: silence stupid gcc warnings about unitialized variable
Diffstat (limited to 'src/core/machine-id-setup.c')
-rw-r--r-- | src/core/machine-id-setup.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c index 86da16c31e..9de528b6cf 100644 --- a/src/core/machine-id-setup.c +++ b/src/core/machine-id-setup.c @@ -259,11 +259,12 @@ int machine_id_setup(const char *root, sd_id128_t machine_id) { /* Hmm, we couldn't write it? So let's write it to * /run/machine-id as a replacement */ - RUN_WITH_UMASK(0022) + RUN_WITH_UMASK(0022) { r = write_string_file(run_machine_id, id, WRITE_STRING_FILE_CREATE); - if (r < 0) { - (void) unlink(run_machine_id); - return log_error_errno(r, "Cannot write %s: %m", run_machine_id); + if (r < 0) { + (void) unlink(run_machine_id); + return log_error_errno(r, "Cannot write %s: %m", run_machine_id); + } } /* And now, let's mount it over */ |