diff mbox

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

Message ID 1423499364-2438-4-git-send-email-wsheppard@embedded-bits.co.uk
State Rejected
Headers show

Commit Message

Will Sheppard Feb. 9, 2015, 4:29 p.m. UTC
Signed-off-by: Will Sheppard <wsheppard@embedded-bits.co.uk>
---
 package/system/mtd/src/trx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

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);
 	}