diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-12-03 03:13:34 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-12-03 03:13:34 +0100 |
commit | 3543f8218b732132dff6d0dccb2ce357e4154801 (patch) | |
tree | a2564db635499b31b5a131522ad854729c695670 /src | |
parent | 41114e81b562bcee52be1ef94c684ace2362ca54 (diff) |
machine-id-setup: casting const away is ugly, let's not do it if there's no reason to
Diffstat (limited to 'src')
-rw-r--r-- | src/core/machine-id-setup.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c index 77f047dde8..d8600bde2d 100644 --- a/src/core/machine-id-setup.c +++ b/src/core/machine-id-setup.c @@ -200,11 +200,13 @@ int machine_id_setup(const char *root) { etc_machine_id = "/etc/machine-id"; run_machine_id = "/run/machine-id"; } else { - etc_machine_id = strappenda(root, "/etc/machine-id"); - path_kill_slashes((char*) etc_machine_id); + char *x; - run_machine_id = strappenda(root, "/run/machine-id"); - path_kill_slashes((char*) run_machine_id); + x = strappenda(root, "/etc/machine-id"); + etc_machine_id = path_kill_slashes(x); + + x = strappenda(root, "/run/machine-id"); + run_machine_id = path_kill_slashes(x); } RUN_WITH_UMASK(0000) { |