The token for atm_intr is actually a void *, not an int. Clarify
what atm_intr expects in a comment and de-obfuscate the code a little bit by replacing the portability macros with the native BSD names.
This commit is contained in:
parent
c018b8a86e
commit
f5e52d8bdd
@ -467,9 +467,11 @@ fore_recv_drain(fup)
|
||||
* Prepend callback function pointer and token value to buffer.
|
||||
* We have already guaranteed that the space is available
|
||||
* in the first buffer.
|
||||
* Don't count this extra fields in m_pkthdr.len (XXX)
|
||||
*/
|
||||
KB_HEADADJ(mhead, sizeof(atm_intr_func_t) + sizeof(int));
|
||||
KB_DATASTART(mhead, cp, caddr_t);
|
||||
mhead->m_data -= sizeof(atm_intr_func_t) + sizeof(void *);
|
||||
mhead->m_len += sizeof(atm_intr_func_t) + sizeof(void *);
|
||||
cp = mtod(mhead, caddr_t);
|
||||
*((atm_intr_func_t *)cp) = fore_recv_stack;
|
||||
cp += sizeof(atm_intr_func_t);
|
||||
*((void **)cp) = (void *)fvp;
|
||||
|
Loading…
Reference in New Issue
Block a user