diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-06-22 17:18:35 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-06-22 17:18:35 +0200 |
commit | b98f393d88262dc7afc321ac48c228d3b67b0178 (patch) | |
tree | bb1ba09fe046b23af9623a92e0234208b7f9ad85 /src/libsystemd | |
parent | bus-message: avoid dereferencing a NULL pointer (diff) | |
download | systemd-b98f393d88262dc7afc321ac48c228d3b67b0178.tar.xz systemd-b98f393d88262dc7afc321ac48c228d3b67b0178.zip |
bus-message: add macro for calculation of offset from the page
Diffstat (limited to 'src/libsystemd')
-rw-r--r-- | src/libsystemd/sd-bus/bus-message.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index 8a8fbde781..55e35cd902 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -3022,7 +3022,7 @@ int bus_body_part_map(struct bus_body_part *part) { return 0; } - shift = part->memfd_offset - ((part->memfd_offset / page_size()) * page_size()); + shift = PAGE_OFFSET(part->memfd_offset); psz = PAGE_ALIGN(part->size + shift); if (part->memfd >= 0) |