From 5bc23ce3e6d0bcc6d8cf2b49c90775c540802267 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 25 Apr 2009 07:39:06 +0000 Subject: [PATCH] merge -r15319 to 8.09 (#5005) SVN-Revision: 15401 --- package/switch/src/switch-robo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/switch/src/switch-robo.c b/package/switch/src/switch-robo.c index 002aa04289..f69ba1f4ca 100644 --- a/package/switch/src/switch-robo.c +++ b/package/switch/src/switch-robo.c @@ -69,6 +69,7 @@ extern char *nvram_get(const char *name); +#define getvar(str) (nvram_get(str)?:"") /* Data structure for a Roboswitch device. */ struct robo_switch { @@ -274,7 +275,7 @@ static int robo_switch_enable(void) } /* WAN port LED, except for Netgear WGT634U */ - if (strcmp(nvram_get("nvram_type"), "cfe")) + if (strcmp(getvar("nvram_type"), "cfe") != 0) robo_write16(ROBO_CTRL_PAGE, 0x16, 0x1F); return 0; -- 2.30.2