Lines Matching refs:sz
241 size_t bus_gvariant_determine_word_size(size_t sz, size_t extra) { in bus_gvariant_determine_word_size() argument
242 if (sz + extra <= 0xFF) in bus_gvariant_determine_word_size()
244 else if (sz + extra*2 <= 0xFFFF) in bus_gvariant_determine_word_size()
246 else if (sz + extra*4 <= 0xFFFFFFFF) in bus_gvariant_determine_word_size()
252 size_t bus_gvariant_read_word_le(void *p, size_t sz) { in bus_gvariant_read_word_le() argument
261 if (sz == 1) in bus_gvariant_read_word_le()
264 memcpy(&x, p, sz); in bus_gvariant_read_word_le()
266 if (sz == 2) in bus_gvariant_read_word_le()
268 else if (sz == 4) in bus_gvariant_read_word_le()
270 else if (sz == 8) in bus_gvariant_read_word_le()
276 void bus_gvariant_write_word_le(void *p, size_t sz, size_t value) { in bus_gvariant_write_word_le() argument
284 assert(sz == 8 || (value < (1ULL << (sz*8)))); in bus_gvariant_write_word_le()
286 if (sz == 1) { in bus_gvariant_write_word_le()
289 } else if (sz == 2) in bus_gvariant_write_word_le()
291 else if (sz == 4) in bus_gvariant_write_word_le()
293 else if (sz == 8) in bus_gvariant_write_word_le()
298 memcpy(p, &x, sz); in bus_gvariant_write_word_le()