blob: 80aeb377f788b4fc99df9750a8a36a226946a987 [file] [log] [blame]
Dmitry V. Levin0c8c5c92015-11-29 00:06:45 +00001static void
2get_error(struct tcb *tcp, const bool check_errno)
3{
4 if (check_errno && is_negated_errno(bfin_r0)) {
5 tcp->u_rval = -1;
6 tcp->u_error = -bfin_r0;
7 } else {
8 tcp->u_rval = bfin_r0;
9 }
Dmitry V. Levind70d1c42015-03-22 22:13:55 +000010}