Attention is currently required from: jolly, dexter.
5 comments:
File src/libmsc/msc_vgcs.c:
Patch Set #12, Line 224: static uint8_t _rx_callref(uint8_t *ie, unsigned int remaining_len, uint32_t *callref, bool *with_prio, uint8_t *prio)
so the function returns uint8_t, but you are using "return _msg_too_short()", which might retunr -EINVAL. That won't work. You need to make _rx_callref return an int type ,and make sure at all callers to check for negative return values
Patch Set #12, Line 364: _rx_callref
return value could be negative
ie = (da << 3) | (ua << 2) | (comm << 1) | oi;
msgb_put_u8(msg, ie);
depending on your taste, this could of course be wrapped in one line like
msgb_put_u8(msg, (da << 3) | (ua << 2) | (comm << 1) | oi);
My earlier comment "use a stack variable" was assuming there might be multiple steps to put together the uint8_t value, which might be more convoluted than or-ing a few values.
I still like the current code as it is explicit, but just clarifying my earlier comment.
Patch Set #12, Line 423: _rx_callref
negative return value
Patch Set #12, Line 536: ie_len = _rx_callref(ie, remaining_len, callref, with_prio, prio);
negative return value
To view, visit change 33511. To unsubscribe, or for help writing mail filters, visit settings.