mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-07-16 09:47:31 +00:00
pbuf: Use SYS_ARCH_INC in pbuf_ref()
Use SYS_ARCH_INC to simplify the code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
parent
40f2bed5c4
commit
1c5c96a50a
|
@ -766,12 +766,9 @@ pbuf_clen(struct pbuf *p)
|
|||
void
|
||||
pbuf_ref(struct pbuf *p)
|
||||
{
|
||||
SYS_ARCH_DECL_PROTECT(old_level);
|
||||
/* pbuf given? */
|
||||
if (p != NULL) {
|
||||
SYS_ARCH_PROTECT(old_level);
|
||||
++(p->ref);
|
||||
SYS_ARCH_UNPROTECT(old_level);
|
||||
SYS_ARCH_INC(p->ref, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user