From: Hauke Mehrtens Date: Sun, 14 Jul 2013 11:28:37 +0000 (+0000) Subject: broadcom-diag: check the correct value for not null. X-Git-Tag: reboot~9934 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c7370edf98a0a48db03e9bb7b969fdc41f714be5;p=openwrt%2Fstaging%2Fblogic.git broadcom-diag: check the correct value for not null. This also fixes a compile warning. SVN-Revision: 37279 --- diff --git a/package/kernel/broadcom-diag/src/diag.c b/package/kernel/broadcom-diag/src/diag.c index 849a843af415..ace44cce551c 100644 --- a/package/kernel/broadcom-diag/src/diag.c +++ b/package/kernel/broadcom-diag/src/diag.c @@ -1109,7 +1109,7 @@ static struct platform_t __initdata platforms[] = { static struct platform_t __init *platform_detect_legacy(void) { - char *boardnum, *boardtype, *buf; + char *boardnum, *boardtype; if (strcmp(getvar("nvram_type"), "cfe") == 0) return &platforms[WGT634U]; @@ -1232,7 +1232,7 @@ static struct platform_t __init *platform_detect_legacy(void) } } - if (buf || !strcmp(boardnum, "00")) {/* probably buffalo */ + if (boardnum || !strcmp(boardnum, "00")) {/* probably buffalo */ if (startswith(boardtype, "bcm94710ap")) return &platforms[BUFFALO_UNKNOWN_4710]; else