/* Display synthetic message serial number in a more readable
* format than UINT32_MAX */
- if (BUS_MESSAGE_COOKIE(m) == 0xFFFFFFFFULL)
+ if (BUS_MESSAGE_COOKIE(m) == UINT32_MAX)
fprintf(f, " Cookie=-1");
else
fprintf(f, " Cookie=%" PRIu64, BUS_MESSAGE_COOKIE(m));
return message_append_field_uint64(m, BUS_MESSAGE_HEADER_REPLY_SERIAL, cookie);
else {
/* 64bit cookies are not supported on dbus1 */
- if (cookie > 0xffffffffUL)
+ if (cookie > UINT32_MAX)
return -EOPNOTSUPP;
return message_append_field_uint32(m, BUS_MESSAGE_HEADER_REPLY_SERIAL, (uint32_t) cookie);
if (m->poisoned)
return -ESTALE;
- if (cookie > 0xffffffffULL &&
+ if (cookie > UINT32_MAX &&
!BUS_MESSAGE_IS_GVARIANT(m))
return -EOPNOTSUPP;
* pick a fixed, artificial one. We use UINT32_MAX rather
* than UINT64_MAX since dbus1 only had 32bit identifiers,
* even though kdbus can do 64bit. */
- return sd_bus_message_seal(m, 0xFFFFFFFFULL, 0);
+ return sd_bus_message_seal(m, UINT32_MAX, 0);
}
static int bus_write_message(sd_bus *bus, sd_bus_message *m, size_t *idx) {