From patchwork Tue Dec 16 07:00:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yousong Zhou X-Patchwork-Id: 422458 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 6350A140079 for ; Thu, 18 Dec 2014 13:55:28 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 374CD28BBA5; Thu, 18 Dec 2014 03:52:09 +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=-0.9 required=5.0 tests=BAYES_00, DATE_IN_PAST_24_48, FREEMAIL_FROM,T_DKIM_INVALID autolearn=no version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 4BD3B28BBE3 for ; Thu, 18 Dec 2014 03:51:38 +0100 (CET) X-policyd-weight: using cached result; rate:hard: -8.5 Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 18 Dec 2014 03:51:35 +0100 (CET) Received: by mail-pa0-f50.google.com with SMTP id bj1so433233pad.9 for ; Wed, 17 Dec 2014 18:53:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Vp8sKIlZpsRCdcmt9/osiLBcXGju/OKd2SwHNUuuAqc=; b=C2mg2mxlOZEgmlVT2/6i3W/IL7EkVWty3pkH1BqSyRnhIMFMN+c2KgmRvC9k9AXNHY umfL+dqaKM/y4LDmgn9lA7+1rlq9KthMS483X0i8tG28ukmLAN5siOdqnAOLiChxWBqh MHN+Y2QqUc+hK1CaSu3zngd/JXcJNv8P2qkgz1cVCg/qvIYdBFPrrfA/Emtr/PquEF76 Akb/Kuome6dh2f22Kd9ij2l8q4eJFTiKlS5SinLX4+WULFFVWI6wtsIxmd09v4Cn6sPR y8CxVA58JQ/dUQ5/3eg5uNqSG7wXiy29HFXw58bUsELhH+NEPqwE0x2cjY6pKgBLJIN2 UZ5A== X-Received: by 10.66.178.198 with SMTP id da6mr29322707pac.126.1418871205088; Wed, 17 Dec 2014 18:53:25 -0800 (PST) Received: from debian.lan ([103.29.140.56]) by mx.google.com with ESMTPSA id oy7sm5104495pbc.88.2014.12.17.18.53.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Dec 2014 18:53:23 -0800 (PST) From: Yousong Zhou To: nbd@openwrt.org Date: Tue, 16 Dec 2014 15:00:07 +0800 Message-Id: <1418713218-16300-6-git-send-email-yszhou4tech@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1418713218-16300-1-git-send-email-yszhou4tech@gmail.com> References: <1418713218-16300-1-git-send-email-yszhou4tech@gmail.com> Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH v2 05/16] file: fix error string about "unterminated XXX". 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" - Remove unreachable call to uci_parse_error(). - Fix false claim of unterminated double quote to single quote. Signed-off-by: Yousong Zhou --- file.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/file.c b/file.c index 3f02c11..0fc68a6 100644 --- a/file.c +++ b/file.c @@ -157,7 +157,6 @@ static void parse_double_quote(struct uci_context *ctx, int *target) break; } } - uci_parse_error(ctx, "unterminated \""); } /* @@ -180,14 +179,13 @@ static void parse_single_quote(struct uci_context *ctx, int *target) /* Multi-line str value */ uci_getln(ctx, pctx->pos); if (!pctx_cur_char(pctx)) - uci_parse_error(ctx, "EOF with unterminated \""); + uci_parse_error(ctx, "EOF with unterminated '"); break; default: addc(ctx, target, &pctx->pos); } } - uci_parse_error(ctx, "unterminated '"); } /*