mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-28 00:15:16 +00:00
PPP: set protocol_list[] const
This array is a constant list of protocols, save some ram space by adding the const modifier it deserves.
This commit is contained in:
parent
1e6c4ac017
commit
c4eb52dcff
@ -1447,7 +1447,7 @@ int get_loop_output(void) {
|
||||
struct protocol_list {
|
||||
u_short proto;
|
||||
const char *name;
|
||||
} protocol_list[] = {
|
||||
} const protocol_list[] = {
|
||||
{ 0x21, "IP" },
|
||||
{ 0x23, "OSI Network Layer" },
|
||||
{ 0x25, "Xerox NS IDP" },
|
||||
@ -1582,7 +1582,7 @@ struct protocol_list {
|
||||
* protocol_name - find a name for a PPP protocol.
|
||||
*/
|
||||
const char * protocol_name(int proto) {
|
||||
struct protocol_list *lp;
|
||||
const struct protocol_list *lp;
|
||||
|
||||
for (lp = protocol_list; lp->proto != 0; ++lp) {
|
||||
if (proto == lp->proto) {
|
||||
|
Loading…
Reference in New Issue
Block a user