From patchwork Mon Feb 9 16:29:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Sheppard X-Patchwork-Id: 437973 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49F6C140151 for ; Tue, 10 Feb 2015 03:32:45 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id E281728C0D1; Mon, 9 Feb 2015 17:27:55 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 96F4828BC5A for ; Mon, 9 Feb 2015 17:27:01 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-wi0-f178.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Mon, 9 Feb 2015 17:26:59 +0100 (CET) Received: by mail-wi0-f178.google.com with SMTP id hm9so7430579wib.5 for ; Mon, 09 Feb 2015 08:29:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=6f1wxdOma8LXd548Cd/wKPHkLBFU22F9S/p1OJPyHHo=; b=06y+FAVmjQOCOofiH1iogrQtNIC7vtPXRoAvBqaoUEKOx5ApX+9FwuQS8kXXZuRP/3 DcOBXcvB26ahUUHlk8gevm+LwlKvyWTTAC7/g4XAIZkQOzEbhOz52re/yL5nWA6h91Rw Nb5i1m8uKuIsKKhYcctAgclMpogUXtljL5hXkf3p6YU63ukB0VsgqG+oeEuOdsLPaUmR gs85yHh9U12+ikW+udDi0rqDPCl6bQXviyromRZ9BY8YgMCxQRkMEhRiMe5TfMCje3vI PcvjqjI/UNNj2+szLrEC6NHWoYyx+knyuICHR3/pmJQmnZznG8QA8K7fDKmpcF0GG+uM GWlA== X-Received: by 10.194.158.39 with SMTP id wr7mr44407341wjb.118.1423499375783; Mon, 09 Feb 2015 08:29:35 -0800 (PST) Received: from willubuntu.willshep.co.uk (cpc3-hawk16-2-0-cust105.18-1.cable.virginm.net. [92.236.92.106]) by mx.google.com with ESMTPSA id bi9sm15051109wib.18.2015.02.09.08.29.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Feb 2015 08:29:35 -0800 (PST) From: Will Sheppard X-Google-Original-From: Will Sheppard To: openwrt-devel@lists.openwrt.org Date: Mon, 9 Feb 2015 16:29:20 +0000 Message-Id: <1423499364-2438-4-git-send-email-wsheppard@embedded-bits.co.uk> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423499364-2438-1-git-send-email-wsheppard@embedded-bits.co.uk> References: <1423499364-2438-1-git-send-email-wsheppard@embedded-bits.co.uk> Subject: [OpenWrt-Devel] [PATCH v1 3/7] mtd: Fix: Use TRX_MAGIC define not hard-coded number X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Will Sheppard --- 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); }