Skip to contentSkip to conversation

NET: Correct potential missing goto label in case statement.

PATCH New Gray Remlin 2 participants 2 messages Mar 29, 2011 – Apr 27, 2011 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NET: Correct potential missing goto label in case statement.

If neither CONFIG_CMD_PING or CONFIG_CMD_SNTP are defined but CONFIG_CMD_DNS is, a compile-time error will occur due to the absence of a goto label.

---
 net/net.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
net/net.c +2 -1
index a609632..e50bdf1 100644
@@ -1724,7 +1724,8 @@ static int net_check_prereq (proto_t protocol)
 			puts ("*** ERROR: `serverip' not set\n");
 			return (1);
 		}
-#if defined(CONFIG_CMD_PING) || defined(CONFIG_CMD_SNTP)
+#if defined(CONFIG_CMD_PING) || defined(CONFIG_CMD_SNTP) || \
+    defined(CONFIG_CMD_DNS)
     common:
 #endif
 
Signature · 1 line
1.7.4
#1 lore raw

PATCH 1/1 NET: Correct potential missing goto label in case statement.

Dear Gray Remlin,

Quoted 8 lines · In message <[email protected]> you wrote:

If neither CONFIG_CMD_PING or CONFIG_CMD_SNTP are defined but CONFIG_CMD_DNS is, a compile-time error will occur due to the absence of a goto label.

---
 net/net.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 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
The use of COBOL cripples the mind; its teaching  should,  therefore,
be regarded as a criminal offence.
          -- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5