Lines Matching refs:dest_len
117 static int copy_integer(unsigned char *dest, size_t dest_len, in copy_integer() argument
125 if (src_len < dest_len) { in copy_integer()
126 n = dest_len - src_len; in copy_integer()
130 n = src_len - dest_len; in copy_integer()
140 memcpy(dest, src + n, dest_len); in copy_integer()
143 if (src_len < dest_len) { in copy_integer()
144 n = dest_len - src_len; in copy_integer()
148 n = src_len - dest_len; in copy_integer()
149 if (!check_sign_bytes(src + dest_len, n, pad) in copy_integer()
154 || (signed_int && ((pad ^ src[dest_len - 1]) & 0x80) != 0)) { in copy_integer()
158 memcpy(dest, src, dest_len); in copy_integer()
165 static int signed_from_signed(void *dest, size_t dest_len, in signed_from_signed() argument
168 return copy_integer(dest, dest_len, src, src_len, in signed_from_signed()
173 static int signed_from_unsigned(void *dest, size_t dest_len, in signed_from_unsigned() argument
176 return copy_integer(dest, dest_len, src, src_len, 0, 1); in signed_from_unsigned()
180 static int unsigned_from_signed(void *dest, size_t dest_len, in unsigned_from_signed() argument
187 return copy_integer(dest, dest_len, src, src_len, 0, 0); in unsigned_from_signed()
191 static int unsigned_from_unsigned(void *dest, size_t dest_len, in unsigned_from_unsigned() argument
194 return copy_integer(dest, dest_len, src, src_len, 0, 0); in unsigned_from_unsigned()