From: Lennart Poettering Date: Wed, 3 Dec 2014 02:13:34 +0000 (+0100) Subject: machine-id-setup: casting const away is ugly, let's not do it if there's no reason to X-Git-Tag: v218~147 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=3543f8218b732132dff6d0dccb2ce357e4154801 machine-id-setup: casting const away is ugly, let's not do it if there's no reason to --- diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c index 77f047dde..d8600bde2 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) {