From: Franck Bui Date: Mon, 11 Apr 2022 09:01:12 +0000 (+0200) Subject: tmpfiles: constify item_compatible() parameters X-Git-Tag: v251-rc2~118^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a6aafd6ab6211a4142ebd72bd8c42ddbe2841eaa;p=thirdparty%2Fsystemd.git tmpfiles: constify item_compatible() parameters --- diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index f41f086be12..be09d19a9af 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -2657,7 +2657,7 @@ static int item_compare(const Item *a, const Item *b) { return CMP(a->type, b->type); } -static bool item_compatible(Item *a, Item *b) { +static bool item_compatible(const Item *a, const Item *b) { assert(a); assert(b); assert(streq(a->path, b->path)); @@ -2896,13 +2896,13 @@ static int parse_age_by_from_arg(const char *age_by_str, Item *item) { return 0; } -static bool is_duplicated_item(ItemArray *existing, Item *i) { +static bool is_duplicated_item(ItemArray *existing, const Item *i) { assert(existing); assert(i); for (size_t n = 0; n < existing->n_items; n++) { - Item *e = existing->items + n; + const Item *e = existing->items + n; if (item_compatible(e, i)) continue;