[OpenWrt-Devel] [PATCH v1 3/7] mtd: Fix: Use TRX_MAGIC define not hard-coded number

Will Sheppard sheppard.will at gmail.com
Mon Feb 9 11:29:20 EST 2015


Signed-off-by: Will Sheppard <wsheppard at embedded-bits.co.uk>
---
 package/system/mtd/src/trx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/system/mtd/src/trx.c b/package/system/mtd/src/trx.c
index 5d0f364..1722cf2 100644
--- a/package/system/mtd/src/trx.c
+++ b/package/system/mtd/src/trx.c
@@ -189,7 +189,7 @@ mtd_fixtrx(const char *mtd, size_t offset)
 	}
 
 	trx = (struct trx_header *) (buf + offset);
-	if (trx->magic != STORE32_LE(0x30524448)) {
+	if (trx->magic != STORE32_LE(TRX_MAGIC)) {
 		fprintf(stderr, "No trx magic found\n");
 		exit(1);
 	}
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list