mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
PPP, PPPoS, removed ppp_accm_mask[], saved a few bytes of ROM
This was a pretty naive way of doing a bitshift, code is smaller if we let the compiler decide.
This commit is contained in:
parent
5984c996a8
commit
2aabe16163
@ -97,8 +97,7 @@ static const struct link_callbacks pppos_callbacks = {
|
|||||||
|
|
||||||
/* PPP's Asynchronous-Control-Character-Map. The mask array is used
|
/* PPP's Asynchronous-Control-Character-Map. The mask array is used
|
||||||
* to select the specific bit for a character. */
|
* to select the specific bit for a character. */
|
||||||
static const u_char ppp_accm_mask[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
|
#define ESCAPE_P(accm, c) ((accm)[(c) >> 3] & 1 << (c & 0x07))
|
||||||
#define ESCAPE_P(accm, c) ((accm)[(c) >> 3] & ppp_accm_mask[c & 0x07])
|
|
||||||
|
|
||||||
#if PPP_FCS_TABLE
|
#if PPP_FCS_TABLE
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user