Skip to contentSkip to conversation

copy_filename: constify "src" arg

PATCH New Mike Frysinger 2 participants 2 messages Oct 20, 2010 – Nov 28, 2010 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 copy_filename: constify "src" arg

---
 include/net.h |    2 +-
 net/net.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/net.h +1 -1
index a29dafc..dd673f0 100644
@@ -526,7 +526,7 @@ extern ushort string_to_VLAN(char *s);
 extern ushort getenv_VLAN(char *);
 
 /* copy a filename (allow for "..." notation, limit length) */
-extern void	copy_filename (char *dst, char *src, int size);
+extern void	copy_filename (char *dst, const char *src, int size);
 
 /* get a random source port */
 extern unsigned int random_port(void);
net/net.c +1 -1
index d5a5429..7576419 100644
@@ -1865,7 +1865,7 @@ NetSetIP(volatile uchar * xip, IPaddr_t dest, int dport, int sport, int len)
 	ip->ip_sum   = ~NetCksum((uchar *)ip, IP_HDR_SIZE_NO_UDP / 2);
 }
 
-void copy_filename (char *dst, char *src, int size)
+void copy_filename (char *dst, const char *src, int size)
 {
 	if (*src && (*src == '"')) {
 		++src;
Signature · 1 line
1.7.3.1
#1 lore raw

PATCH 1/1 copy_filename: constify "src" arg

Dear Mike Frysinger,

Quoted 5 lines · In message <[email protected]> you wrote:
---
 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 · 5 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
Intuition, however illogical, is recognized as a command prerogative.
	-- Kirk, "Obsession", stardate 3620.7