Lines Matching refs:ret

31   uint32_t ret;  in avb_be32toh()  local
32 ret = ((uint32_t)d[0]) << 24; in avb_be32toh()
33 ret |= ((uint32_t)d[1]) << 16; in avb_be32toh()
34 ret |= ((uint32_t)d[2]) << 8; in avb_be32toh()
35 ret |= ((uint32_t)d[3]); in avb_be32toh()
36 return ret; in avb_be32toh()
41 uint64_t ret; in avb_be64toh() local
42 ret = ((uint64_t)d[0]) << 56; in avb_be64toh()
43 ret |= ((uint64_t)d[1]) << 48; in avb_be64toh()
44 ret |= ((uint64_t)d[2]) << 40; in avb_be64toh()
45 ret |= ((uint64_t)d[3]) << 32; in avb_be64toh()
46 ret |= ((uint64_t)d[4]) << 24; in avb_be64toh()
47 ret |= ((uint64_t)d[5]) << 16; in avb_be64toh()
48 ret |= ((uint64_t)d[6]) << 8; in avb_be64toh()
49 ret |= ((uint64_t)d[7]); in avb_be64toh()
50 return ret; in avb_be64toh()
58 } ret; in avb_htobe32() local
59 ret.bytes[0] = (in >> 24) & 0xff; in avb_htobe32()
60 ret.bytes[1] = (in >> 16) & 0xff; in avb_htobe32()
61 ret.bytes[2] = (in >> 8) & 0xff; in avb_htobe32()
62 ret.bytes[3] = in & 0xff; in avb_htobe32()
63 return ret.word; in avb_htobe32()
71 } ret; in avb_htobe64() local
72 ret.bytes[0] = (in >> 56) & 0xff; in avb_htobe64()
73 ret.bytes[1] = (in >> 48) & 0xff; in avb_htobe64()
74 ret.bytes[2] = (in >> 40) & 0xff; in avb_htobe64()
75 ret.bytes[3] = (in >> 32) & 0xff; in avb_htobe64()
76 ret.bytes[4] = (in >> 24) & 0xff; in avb_htobe64()
77 ret.bytes[5] = (in >> 16) & 0xff; in avb_htobe64()
78 ret.bytes[6] = (in >> 8) & 0xff; in avb_htobe64()
79 ret.bytes[7] = in & 0xff; in avb_htobe64()
80 return ret.word; in avb_htobe64()
197 void* ret = avb_malloc_(size); in avb_malloc() local
198 if (ret == NULL) { in avb_malloc()
202 return ret; in avb_malloc()
206 void* ret = avb_malloc(size); in avb_calloc() local
207 if (ret == NULL) { in avb_calloc()
211 avb_memset(ret, '\0', size); in avb_calloc()
212 return ret; in avb_calloc()
217 char* ret = avb_malloc(len + 1); in avb_strdup() local
218 if (ret == NULL) { in avb_strdup()
222 avb_memcpy(ret, str, len); in avb_strdup()
223 ret[len] = '\0'; in avb_strdup()
225 return ret; in avb_strdup()
267 char* ret = NULL; in avb_replace() local
288 if (ret == NULL) { in avb_replace()
290 ret = avb_malloc(num_new); in avb_replace()
291 if (ret == NULL) { in avb_replace()
294 avb_memcpy(ret, str, num_before); in avb_replace()
295 avb_memcpy(ret + num_before, replace, replace_len); in avb_replace()
296 ret[num_new - 1] = '\0'; in avb_replace()
305 avb_memcpy(new_str, ret, ret_len); in avb_replace()
309 avb_free(ret); in avb_replace()
310 ret = new_str; in avb_replace()
318 if (ret == NULL) { in avb_replace()
319 ret = avb_strdup(str_after_last_replace); in avb_replace()
320 if (ret == NULL) { in avb_replace()
330 avb_memcpy(new_str, ret, ret_len); in avb_replace()
333 avb_free(ret); in avb_replace()
334 ret = new_str; in avb_replace()
339 return ret; in avb_replace()
351 char *ret = NULL, *dest; in avb_strdupv() local
373 ret = avb_malloc(total_length + 1); in avb_strdupv()
374 if (ret == NULL) { in avb_strdupv()
378 dest = ret; in avb_strdupv()
384 avb_assert(dest == ret + total_length); in avb_strdupv()
387 return ret; in avb_strdupv()