chiark / gitweb /
machine: make sure unpriviliged "machinectl status" can show the machine's OS version
[elogind.git] / src / machine / machine.c
index 0ed18d74ece89a8c0680e6f70b73a79ba0c74728..1c9177e1c379b9a60ad2a7424b42bf2b8af8b4a6 100644 (file)
@@ -291,14 +291,14 @@ int machine_load(Machine *m) {
 
         if (netif) {
                 size_t l, allocated = 0, nr = 0;
 
         if (netif) {
                 size_t l, allocated = 0, nr = 0;
-                char *w, *state;
+                const char *word, *state;
                 int *ni = NULL;
 
                 int *ni = NULL;
 
-                FOREACH_WORD(w, l, netif, state) {
+                FOREACH_WORD(word, l, netif, state) {
                         char buf[l+1];
                         int ifi;
 
                         char buf[l+1];
                         int ifi;
 
-                        *(char*) (mempcpy(buf, w, l)) = 0;
+                        *(char*) (mempcpy(buf, word, l)) = 0;
 
                         if (safe_atoi(buf, &ifi) < 0)
                                 continue;
 
                         if (safe_atoi(buf, &ifi) < 0)
                                 continue;