From: John Crispin Date: Fri, 27 Dec 2013 21:15:31 +0000 (+0000) Subject: firmware-utils: check_magic() in buffalo-lib.c always return 0 X-Git-Tag: reboot~8292 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3b4152bfda495105fac86c36bc791ccdb91ea142;p=oweals%2Fopenwrt.git firmware-utils: check_magic() in buffalo-lib.c always return 0 spotted with cppcheck Signed-off-by: Etienne CHAMPETIER SVN-Revision: 39171 --- diff --git a/tools/firmware-utils/src/buffalo-lib.c b/tools/firmware-utils/src/buffalo-lib.c index 29aee9f88d..add3a7e023 100644 --- a/tools/firmware-utils/src/buffalo-lib.c +++ b/tools/firmware-utils/src/buffalo-lib.c @@ -249,10 +249,10 @@ static uint32_t get_be32(void *data) static int check_magic(void *magic) { - if (!memcmp("start", magic, ENC_MAGIC_LEN)); + if (!memcmp("start", magic, ENC_MAGIC_LEN)) return 0; - if (!memcmp("asar1", magic, ENC_MAGIC_LEN)); + if (!memcmp("asar1", magic, ENC_MAGIC_LEN)) return 0; return -1;