if (ofst + size <= 4) {
val = lo >> (ofst * 8);
} else {
- g_assert_cmpint(size, >, 1);
+ g_assert(size > 1);
/* If the 64bit read is unaligned, we will produce undefined
* results. AHCI does not support unaligned 64bit reads. */
void spapr_ovec_set(sPAPROptionVector *ov, long bitnr)
{
g_assert(ov);
- g_assert_cmpint(bitnr, <, OV_MAXBITS);
+ g_assert(bitnr < OV_MAXBITS);
set_bit(bitnr, ov->bitmap);
}
void spapr_ovec_clear(sPAPROptionVector *ov, long bitnr)
{
g_assert(ov);
- g_assert_cmpint(bitnr, <, OV_MAXBITS);
+ g_assert(bitnr < OV_MAXBITS);
clear_bit(bitnr, ov->bitmap);
}
bool spapr_ovec_test(sPAPROptionVector *ov, long bitnr)
{
g_assert(ov);
- g_assert_cmpint(bitnr, <, OV_MAXBITS);
+ g_assert(bitnr < OV_MAXBITS);
return test_bit(bitnr, ov->bitmap) ? true : false;
}
int i;
g_assert(table_addr);
- g_assert_cmpint(vector, >=, 1); /* vector numbering starts at 1 */
+ g_assert(vector >= 1); /* vector numbering starts at 1 */
addr = vector_addr(table_addr, vector);
if (!addr) {
}
vector_len = ldub_phys(&address_space_memory, addr++) + 1;
- g_assert_cmpint(vector_len, <=, OV_MAXBYTES);
+ g_assert(vector_len <= OV_MAXBYTES);
ov = spapr_ovec_new();
for (i = 0; i < vector_len; i++) {
* encoding/sizing expected in ibm,client-architecture-support
*/
vec_len = (lastbit == OV_MAXBITS) ? 1 : lastbit / BITS_PER_BYTE + 1;
- g_assert_cmpint(vec_len, <=, OV_MAXBYTES);
+ g_assert(vec_len <= OV_MAXBYTES);
/* guest expects vector len encoded as vec_len - 1, since the length byte
* is assumed and not included, and the first byte of the vector
* is assumed as well
DPRINTF(s, D_VERBOSE, "error %d\n", p->b.bError);
}
if (len) {
- g_assert_nonnull(data);
+ assert(data);
memcpy(p->abData, data, len);
}
ccid_reset_error_status(s);
GSList *e;
int i;
- g_assert_cmpint(parent->class_size, <=, ti->class_size);
+ g_assert(parent->class_size <= ti->class_size);
memcpy(ti->class, parent->class, parent->class_size);
ti->class->interfaces = NULL;
ti->class->properties = g_hash_table_new_full(
g_assert(type != NULL);
type_initialize(type);
- g_assert_cmpint(type->instance_size, >=, sizeof(Object));
+ g_assert(type->instance_size >= sizeof(Object));
g_assert(type->abstract == false);
- g_assert_cmpint(size, >=, type->instance_size);
+ g_assert(size >= type->instance_size);
memset(obj, 0, type->instance_size);
obj->class = type->class;
object_property_del_all(obj);
object_deinit(obj, ti);
- g_assert_cmpint(obj->ref, ==, 0);
+ g_assert(obj->ref == 0);
if (obj->free) {
obj->free(obj);
}
if (!obj) {
return;
}
- g_assert_cmpint(obj->ref, >, 0);
+ g_assert(obj->ref > 0);
/* parent always holds a reference to its children */
if (atomic_fetch_dec(&obj->ref) == 1) {
return;
}
- g_assert_cmpuint(new->n_buckets, !=, old->n_buckets);
+ g_assert(new->n_buckets != old->n_buckets);
qht_map_iter__all_locked(ht, old, qht_map_copy, new);
qht_map_debug__all_locked(new);