From c4eb52dcff402ecc0ef543c4d96afad4d7410464 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sun, 6 Nov 2016 20:00:31 +0100 Subject: [PATCH] PPP: set protocol_list[] const This array is a constant list of protocols, save some ram space by adding the const modifier it deserves. --- src/netif/ppp/ppp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 39c3c240..0e37eeb2 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -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) {