Patchwork [U-Boot] NET: Correct potential missing goto label in case statement.

login
register
mail settings
Submitter Gray Remlin
Date March 29, 2011, 8:21 p.m.
Message ID <1301430092-23569-1-git-send-email-gryrmln@gmail.com>
Download mbox | patch
Permalink /patch/88856/
State Accepted
Commit 9030a55ef3b82aca88d228692fdceffc4ca14aa2
Headers show

Comments

Gray Remlin - March 29, 2011, 8:21 p.m.
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.

Signed-off-by: Gray Remlin <gryrmln@gmail.com>
---
 net/net.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Wolfgang Denk - April 27, 2011, 10:47 p.m.
Dear Gray Remlin,

In message <1301430092-23569-1-git-send-email-gryrmln@gmail.com> 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.
> 
> Signed-off-by: Gray Remlin <gryrmln@gmail.com>
> ---
>  net/net.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/net/net.c b/net/net.c
index a609632..e50bdf1 100644
--- a/net/net.c
+++ b/net/net.c
@@ -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