Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id EFB19431FDA for ; Tue, 2 Apr 2013 15:42:23 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PRNSNKzANecF for ; Tue, 2 Apr 2013 15:42:23 -0700 (PDT) Received: from mail-da0-f47.google.com (mail-da0-f47.google.com [209.85.210.47]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 98686431FDB for ; Tue, 2 Apr 2013 15:42:19 -0700 (PDT) Received: by mail-da0-f47.google.com with SMTP id s35so380712dak.6 for ; Tue, 02 Apr 2013 15:42:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=uGhCFmhR6GDSZO0Amme3lygoSxHmkPKNyhUcG7bsz4g=; b=wAG49TZe+Wez07QkEGxHqHcuzuhNYWN8RQbQOe4MNwuvKQC2O5qcQHdEUduMGRlhlg RgNDxtop/zn6XJVT5I9yezJznGDPRfh9+1alT4M/EwdIgKxxinzx2RHdtaijWlwD5h+k 2ynHgc+cvg1IOBV5Qt4k5aJ3kU5Vn7AsnEshrlbdv6dEr07NUcBrCgY4doVcrJZBzcj7 p2vnxDvCQDDb6/rsEtEOIVid5GbtXb8QhxK+h+2VCNB5XFEQ8tnZaD7krvYt6emxPnta fRH2IveqsS5YHOeeBvIwLJhlREJkv6av7kaeCCH3QFPY7zN0d0iGA7/wDbCdtWeFT9rn sjew== X-Received: by 10.66.76.170 with SMTP id l10mr27440889paw.190.1364942538782; Tue, 02 Apr 2013 15:42:18 -0700 (PDT) Received: from localhost (215.42.233.220.static.exetel.com.au. [220.233.42.215]) by mx.google.com with ESMTPS id qh4sm4031657pac.8.2013.04.02.15.42.16 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 02 Apr 2013 15:42:18 -0700 (PDT) From: Peter Wang To: notmuch@notmuchmail.org Subject: [PATCH v5 02/12] tag-util: do not reset list in parse_tag_command_line Date: Wed, 3 Apr 2013 09:41:47 +1100 Message-Id: <1364942517-6982-3-git-send-email-novalazy@gmail.com> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1364942517-6982-1-git-send-email-novalazy@gmail.com> References: <1364942517-6982-1-git-send-email-novalazy@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Apr 2013 22:42:24 -0000 No current callers of parse_tag_command_line require that it clear its tag list argument. The notmuch 'insert' command will be better served if the function modifies a pre-populated list (of new.tags) instead of clobbering it outright. --- tag-util.c | 2 -- tag-util.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tag-util.c b/tag-util.c index 92e08a1..3bde409 100644 --- a/tag-util.c +++ b/tag-util.c @@ -165,8 +165,6 @@ parse_tag_command_line (void *ctx, int argc, char **argv, int i; - tag_op_list_reset (tag_ops); - for (i = 0; i < argc; i++) { if (strcmp (argv[i], "--") == 0) { i++; diff --git a/tag-util.h b/tag-util.h index 246de85..4628f16 100644 --- a/tag-util.h +++ b/tag-util.h @@ -81,6 +81,8 @@ parse_tag_line (void *ctx, char *line, * Output Parameters: * ops contains a list of tag operations * query_str the search terms. + * + * The ops argument is not cleared. */ tag_parse_status_t -- 1.7.12.1