string_to_VLAN: constify "var" arg
PATCH 1/1 string_to_VLAN: constify "var" arg
Signed-off-by Mike Frysinger <[email protected]>
--- include/net.h | 2 +- net/net.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/net.h +1 -1
@@ -520,7 +520,7 @@ extern IPaddr_t string_to_ip(char *s);extern void VLAN_to_string (ushort x,char *s);/* Convert a string to a vlan id */ -extern ushort string_to_VLAN (char *s); +extern ushort string_to_VLAN (const char *s);/* read a VLAN id from an environment variable */ extern ushort getenv_VLAN (char *);
net/net.c +1 -1
@@ -1913,7 +1913,7 @@ void VLAN_to_string(ushort x, char *s)sprintf (s,"%d" , x &VLAN_IDMASK ); } -ushort string_to_VLAN (char *s) +ushort string_to_VLAN (const char *s) {ushort id;
Signature · 1 line
1.7.3.1
Wolfgang Denk
AppliedPATCH 1/1 string_to_VLAN: constify "var" arg
Dear Mike Frysinger,
Quoted 5 lines · In message <[email protected]> you wrote:
Signed-off-by Mike Frysinger <[email protected]>--- include/net.h | 2 +- net/net.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Applied to "next" branch, thanks.
Best regards,
Wolfgang Denk
Signature · 8 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de If a person (a) is poorly, (b) receives treatment intended to make him better, and (c) gets better, then no power of reasoning known to medical science can convince him that it may not have been the treatment that restored his health. - Sir Peter Medawar, The Art of the Soluble