diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-11-17 00:00:32 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-11-17 00:52:10 +0100 |
commit | 4a0b58c4a30ecaa61202f845ed86f75b36370cd0 (patch) | |
tree | 1e08b9d596dfb8b4fe3af50315ecf37a7046bb47 /src/bus-proxyd/bus-xml-policy.c | |
parent | 357bc17975e3a60a64c46f56b5330747c67705b2 (diff) |
tree-wide: use right cast macros for UIDs, GIDs and PIDs
Diffstat (limited to 'src/bus-proxyd/bus-xml-policy.c')
-rw-r--r-- | src/bus-proxyd/bus-xml-policy.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bus-proxyd/bus-xml-policy.c b/src/bus-proxyd/bus-xml-policy.c index f0834e9525..debd58ce8b 100644 --- a/src/bus-proxyd/bus-xml-policy.c +++ b/src/bus-proxyd/bus-xml-policy.c @@ -392,11 +392,11 @@ static int file_load(Policy *p, const char *path) { } else { PolicyItem *first; - first = hashmap_get(p->user_items, UINT32_TO_PTR(i->uid)); + first = hashmap_get(p->user_items, UID_TO_PTR(i->uid)); item_append(i, &first); i->uid_valid = true; - r = hashmap_replace(p->user_items, UINT32_TO_PTR(i->uid), first); + r = hashmap_replace(p->user_items, UID_TO_PTR(i->uid), first); if (r < 0) { LIST_REMOVE(items, first, i); return log_oom(); @@ -424,11 +424,11 @@ static int file_load(Policy *p, const char *path) { } else { PolicyItem *first; - first = hashmap_get(p->group_items, UINT32_TO_PTR(i->gid)); + first = hashmap_get(p->group_items, GID_TO_PTR(i->gid)); item_append(i, &first); i->gid_valid = true; - r = hashmap_replace(p->group_items, UINT32_TO_PTR(i->gid), first); + r = hashmap_replace(p->group_items, GID_TO_PTR(i->gid), first); if (r < 0) { LIST_REMOVE(items, first, i); return log_oom(); @@ -787,7 +787,7 @@ static int policy_check(Policy *p, const struct policy_check_filter *filter) { verdict = check_policy_items(p->default_items, filter); if (filter->gid != GID_INVALID) { - items = hashmap_get(p->group_items, UINT32_TO_PTR(filter->gid)); + items = hashmap_get(p->group_items, GID_TO_PTR(filter->gid)); if (items) { v = check_policy_items(items, filter); if (v != DUNNO) @@ -796,7 +796,7 @@ static int policy_check(Policy *p, const struct policy_check_filter *filter) { } if (filter->uid != UID_INVALID) { - items = hashmap_get(p->user_items, UINT32_TO_PTR(filter->uid)); + items = hashmap_get(p->user_items, UID_TO_PTR(filter->uid)); if (items) { v = check_policy_items(items, filter); if (v != DUNNO) @@ -1155,7 +1155,7 @@ static void dump_hashmap_items(Hashmap *h) { void *k; HASHMAP_FOREACH_KEY(i, k, h, j) { - printf("\t%s Item for %u:\n", draw_special_char(DRAW_ARROW), PTR_TO_UINT(k)); + printf("\t%s Item for " UID_FMT ":\n", draw_special_char(DRAW_ARROW), PTR_TO_UID(k)); dump_items(i, "\t\t"); } } |