X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fdevice.c;h=2c41c7b6f44964b787ebdf4cfef72cbec6b4b353;hb=a2a5291b3f5ab6ed4c92f51d0fd10a03047380d8;hp=444286e02b2a7bfc14bd3a5b3c6bab6f10f1955b;hpb=73381fcf54e38456067f0e87b8611a21eff99169;p=elogind.git diff --git a/src/core/device.c b/src/core/device.c index 444286e02..2c41c7b6f 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -220,7 +220,7 @@ static int device_make_description(Unit *u, struct udev_device *dev, const char static int device_add_udev_wants(Unit *u, struct udev_device *dev) { const char *wants; - char *state, *w; + const char *word, *state; size_t l; int r; @@ -234,11 +234,11 @@ static int device_add_udev_wants(Unit *u, struct udev_device *dev) { if (!wants) return 0; - FOREACH_WORD_QUOTED(w, l, wants, state) { + FOREACH_WORD_QUOTED(word, l, wants, state) { _cleanup_free_ char *n = NULL; char e[l+1]; - memcpy(e, w, l); + memcpy(e, word, l); e[l] = 0; n = unit_name_mangle(e, MANGLE_NOGLOB); @@ -393,13 +393,13 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) { * aliases */ alias = udev_device_get_property_value(dev, "SYSTEMD_ALIAS"); if (alias) { - char *state, *w; + const char *word, *state; size_t l; - FOREACH_WORD_QUOTED(w, l, alias, state) { + FOREACH_WORD_QUOTED(word, l, alias, state) { char e[l+1]; - memcpy(e, w, l); + memcpy(e, word, l); e[l] = 0; if (path_is_absolute(e))