From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id AA805429E30 for ; Sun, 31 Mar 2013 02:46:11 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 06om2978nhZJ for ; Sun, 31 Mar 2013 02:46:11 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id A4CC6431FBF for ; Sun, 31 Mar 2013 02:46:10 -0700 (PDT) Received: by mail-la0-f47.google.com with SMTP id fj20so1431187lab.6 for ; Sun, 31 Mar 2013 02:46:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:x-gm-message-state; bh=HSbBVlzWV5EVEpcSmRVfQUchsUWdZkFKbr6dI+5OmNA=; b=pRVTeLeJ8ohswletNA+Fzlfrv9v7Y5WigXXefA6BjJJp+0jlTLb7tAKm+GhjcR9dpM o+LsDeD9zBVApkpQ9J3MfZz8wrG/FhkDuKGEHy4XMXPi6L0WFK4pYmwhDsIXB6ZXNRK6 VQeRDezzy+VgZrIq7UhgJKT8rSRr8WIejkrzu3a7geef+v/lvtBqyIjgQGYba2QwU9ik UQjybo4ZYDuUJ1wuenzyw5SOdpC6YyFnp/5+wmOzuDllBbytcVSftNtrzhbb0p4pCPA7 HcLR1ILAbX4K7YQswAV/yQQIuQDdp4xTSKreut/uV6ZYlBu1yOpu1hf6OwEbWJ23SyCn 2Mwg== X-Received: by 10.112.37.129 with SMTP id y1mr4035537lbj.17.1364723169195; Sun, 31 Mar 2013 02:46:09 -0700 (PDT) Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi. [80.223.81.27]) by mx.google.com with ESMTPS id t17sm3751080lam.9.2013.03.31.02.46.07 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 31 Mar 2013 02:46:08 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH v3 1/6] cli: remove useless talloc_strdup Date: Sun, 31 Mar 2013 12:45:58 +0300 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQnCrZ/iygSs9xEl+fPMrsy04H38zFl19oh48LPWKtd9n70OSdDN9vDGMFZ+cfcOaX6S4iHi Cc: Tomi Ollila 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: Sun, 31 Mar 2013 09:46:12 -0000 If the condition holds, query_string_from_args() has already returned a talloc allocated empty string. There's no need to duplicate that. --- notmuch-count.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/notmuch-count.c b/notmuch-count.c index 390794f..c2f1b7d 100644 --- a/notmuch-count.c +++ b/notmuch-count.c @@ -71,10 +71,6 @@ notmuch_count_command (notmuch_config_t *config, int argc, char *argv[]) return 1; } - if (*query_str == '\0') { - query_str = talloc_strdup (config, ""); - } - query = notmuch_query_create (notmuch, query_str); if (query == NULL) { fprintf (stderr, "Out of memory\n"); -- 1.7.10.4