for better readability.
Signed-off-by: Kefu Chai <kchai@redhat.com>
static constexpr uint32_t bus = 123456;
static constexpr time_t btt = bs;
static constexpr struct timespec bts = { bs, bns };
-static struct ceph_timespec bcts = { init_le32(bs), init_le32(bns) };
+static struct ceph_timespec bcts = { ceph_le32(bs), ceph_le32(bns) };
static constexpr struct timeval btv = { bs, bus };
static constexpr double bd = bs + ((double)bns / 1000000000.);
rados_read_op_read(op2, 0, sizeof(buf2), buf2, NULL, NULL);
rados_read_op_set_flags(op2, LIBRADOS_OP_FLAG_FADVISE_NOCACHE |
LIBRADOS_OP_FLAG_FADVISE_RANDOM);
- ceph_le32 init_value = init_le32(-1);
+ ceph_le32 init_value(-1);
ceph_le32 checksum[2];
rados_read_op_checksum(op2, LIBRADOS_CHECKSUM_TYPE_CRC32C,
reinterpret_cast<char *>(&init_value),
{
rados_read_op_t op = rados_create_read_op();
- ceph_le64 init_value = init_le64(-1);
+ ceph_le64 init_value(-1);
rados_read_op_checksum(op, LIBRADOS_CHECKSUM_TYPE_XXHASH64,
reinterpret_cast<char *>(&init_value),
sizeof(init_value), 0, len, 0, NULL, 0, NULL);
}
{
- ceph_le32 init_value = init_le32(-1);
+ ceph_le32 init_value(-1);
ceph_le32 crc[2];
rados_read_op_t op = rados_create_read_op();
rados_read_op_checksum(op, LIBRADOS_CHECKSUM_TYPE_CRC32C,
}
{
- ceph_le32 init_value = init_le32(-1);
+ ceph_le32 init_value(-1);
int rval;
rados_read_op_t op = rados_create_read_op();
rados_read_op_checksum(op, LIBRADOS_CHECKSUM_TYPE_XXHASH32,
}
{
- ceph_le32 init_value = init_le32(-1);
+ ceph_le32 init_value(-1);
ceph_le32 crc[3];
int rval;
rados_read_op_t op = rados_create_read_op();
uint32_t expected_crc = ceph_crc32c(-1, reinterpret_cast<const uint8_t*>(buf),
sizeof(buf));
- ceph_le32 init_value = init_le32(-1);
+ ceph_le32 init_value(-1);
ceph_le32 crc[2];
ASSERT_EQ(0, rados_checksum(ioctx, "foo", LIBRADOS_CHECKSUM_TYPE_CRC32C,
reinterpret_cast<char*>(&init_value),