From patchwork Sat Apr 30 04:13:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833035 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87B48C433EF for ; Sat, 30 Apr 2022 04:14:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240807AbiD3ERo (ORCPT ); Sat, 30 Apr 2022 00:17:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240763AbiD3ERn (ORCPT ); Sat, 30 Apr 2022 00:17:43 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9827C3AA56 for ; Fri, 29 Apr 2022 21:14:22 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id l18so18689330ejc.7 for ; Fri, 29 Apr 2022 21:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QLFVZeLJHoGwXA28YkRVvihsRVj2aEx4AmNOkIxkYIs=; b=YyYsdcOmPx0fGlIANk1hCxTHKAInoEGkYwMfh6QSXFZmhy9Xqs1DGe3US9CAY0QUxr c4et07zZ6NHt56O/pHd3TXLkEh0hq0IEjMXxe6NnfM9gVTYFAZKYyTfpGTUvcNRCWnOe 5xBUxFqavmThN5r/KTlrTTAyc/en7Y26vyB6Mp926xInHU4oON91sgKRodR5cC/IjfgI tjfcb9oDeKn+XuG/ljME1F0T4BNciPQjB/hvLLvY/yahAe4gqervOXHCAM4DLzHYnlbs pmAKHTOfb7/o47SCR7GZ6VNHvE1m744FRC1hjTXuReX/VCeoKMBCb1TnF6oJ5w+KAeVk o42Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QLFVZeLJHoGwXA28YkRVvihsRVj2aEx4AmNOkIxkYIs=; b=gdwDR2l2xmKy9RlIeZxXlOIxhKR0mY63wHmjbo4Hr/MpP8D3uoUiSkyK/VBgZ1qtUJ Y9ZFYe7V5gpFdIad5h2idCy9WZfvd30ipMFfrHGDMnrYDdQE6chKgmdz06cgCF8RxHnR d0FiF56e0fQAGSS78Aoti5pyadCl3RTm5hFqKcMc5tljX8Lsfdpq0pFoUm7HCEL+K1kv yuimIrX4pZylh9XypmLNIRJ5A9gXGl0xtZgh7oclMPYAWEPfdnpla+6ktL/6hFb0oLNP pxM3Kaq0/osGWzRRQhoFx4NWZEZWUR3AF3HW5a9B43GnZapBO0IgpO7/4WiLWBrOe+v9 iLkQ== X-Gm-Message-State: AOAM532wO/azAWDmqUq4q5gWp2Mb+t2X9qnOyQxa1BpUYsCw6GuA2TTg ZJzQeORhmh5vvZRILKBCLxJ0OE2Uve4= X-Google-Smtp-Source: ABdhPJwwJDFJP4lgh0vsSw8SJXtV0zVUwCNjzYoe+osYlbWPCA2HaqtgvAJDHD5vEwsOAG2Wj6mPIw== X-Received: by 2002:a17:907:eaa:b0:6f3:883c:ef4f with SMTP id ho42-20020a1709070eaa00b006f3883cef4fmr2259410ejc.208.1651292060825; Fri, 29 Apr 2022 21:14:20 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:20 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 01/23] contrib/coccinnelle: add equals-null.cocci Date: Sat, 30 Apr 2022 04:13:44 +0000 Message-Id: <20220430041406.164719-2-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Add a coccinelle semantic patch necessary to reinforce the git coding style guideline: "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- contrib/coccinelle/equals-null.cocci | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 contrib/coccinelle/equals-null.cocci diff --git a/contrib/coccinelle/equals-null.cocci b/contrib/coccinelle/equals-null.cocci new file mode 100644 index 0000000000..92c7054013 --- /dev/null +++ b/contrib/coccinelle/equals-null.cocci @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +@@ +expression e; +statement s; +@@ +if ( +( +!e +| +- e == NULL ++ !e +) + ) + {...} +else s + +@@ +expression e; +statement s; +@@ +if ( +( +e +| +- e != NULL ++ e +) + ) + {...} +else s From patchwork Sat Apr 30 04:13:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833036 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6899C433EF for ; Sat, 30 Apr 2022 04:14:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240833AbiD3ERr (ORCPT ); Sat, 30 Apr 2022 00:17:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239650AbiD3ERn (ORCPT ); Sat, 30 Apr 2022 00:17:43 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94E942E6AC for ; Fri, 29 Apr 2022 21:14:23 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id be20so11045305edb.12 for ; Fri, 29 Apr 2022 21:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+HBcX6rqXtDd+TlP6ia01fBwZnd/wgJlBYpq6GWguoM=; b=HMAAEPKoYph6i8YtChpX6/hYPWmavfq7StMOGVw9tDVElSspbg3HEtgvTs9P3bkZKM ciXBb9hgx4WGk0abySl+th/Zwf8Bjkjnhq9MkvYRiu7SVV//CIEDByxSa7lec3fNNAjF JDmROcT55Q7AqA65Xay3kVkrUdhdc2K0pP3sFu8n3gBAa8+botVhpbAJHjWdR2XrC8yj W4kmbqdtUtR61x0xHyQUOI0H16sISNm0/AZzt3t+0sW/cE7j+pgipHPTVYEKQ+S/sHqf lk/24SozdT64MmoKl83LHFKQ5dSeAYqSDLcOkP/9kyAr6fbfMELfO7a7GG2aDX3vM7SY 1I2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+HBcX6rqXtDd+TlP6ia01fBwZnd/wgJlBYpq6GWguoM=; b=XBSBQui2nGT5Cm8Or+C0wxKeDjUsm/nggZmh7pcxlZ8suFCqIR4WkfGqUMhmWmJC1o ilm8kmPAApYDZ3zmaAX9to481oLvopqRsKOkQntrLC3B2pbFE2V6k5WAG4sxkZKO3wGd xozcG3/f7/HeeZRVbWvD/Z5aeXmD3y8VfkZPrSV5kxjp+cIPQfnxcAloBqeTr3LpTwzk kNG1313RgMF97Ms2CNVZCH1oSKzAXYKDXpVvhwz/nTdoxD7FXrq/tMAkZZUATMjEKoo5 3xjOsDt3h0j+CYIC9xcklhB7xAiU6N5z9AiUmHIzIRpCMrtzdF927raKOxXNNARq7+Gl Ts6w== X-Gm-Message-State: AOAM532nCW8w5q+v/lVoEGDC+93sq2TrwRuzcbSkhuUcw1gzpguoWq4+ b9Rx4dishYuEPb6rCUgp1nPB+Th4/zY= X-Google-Smtp-Source: ABdhPJwX9LT9L8VakX69Ap7alap9Tc3AnIxJKd1LfHYkZIDvg/zrXPf05uirUi3CXmhqzjinbFUpIA== X-Received: by 2002:aa7:d842:0:b0:425:f329:33b1 with SMTP id f2-20020aa7d842000000b00425f32933b1mr2675197eds.74.1651292061884; Fri, 29 Apr 2022 21:14:21 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:21 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 02/23] apply.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:45 +0000 Message-Id: <20220430041406.164719-3-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- apply.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apply.c b/apply.c index d19c26d332..2b7cd930ef 100644 --- a/apply.c +++ b/apply.c @@ -3274,11 +3274,11 @@ static struct patch *in_fn_table(struct apply_state *state, const char *name) { struct string_list_item *item; - if (name == NULL) + if (!name) return NULL; item = string_list_lookup(&state->fn_table, name); - if (item != NULL) + if (item) return (struct patch *)item->util; return NULL; @@ -3318,7 +3318,7 @@ static void add_to_fn_table(struct apply_state *state, struct patch *patch) * This should cover the cases for normal diffs, * file creations and copies */ - if (patch->new_name != NULL) { + if (patch->new_name) { item = string_list_insert(&state->fn_table, patch->new_name); item->util = patch; } From patchwork Sat Apr 30 04:13:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833037 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0212AC433F5 for ; Sat, 30 Apr 2022 04:14:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240859AbiD3ERt (ORCPT ); Sat, 30 Apr 2022 00:17:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240812AbiD3ERp (ORCPT ); Sat, 30 Apr 2022 00:17:45 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAF642E6AC for ; Fri, 29 Apr 2022 21:14:24 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id l7so18752979ejn.2 for ; Fri, 29 Apr 2022 21:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LqSgevMKrnKOuaMi35EpQEVjNRHj2C99lKB2HFrd3mU=; b=mOKYKYxEY0vS72HLSFSdjjA9yCrWJ7aexnTTtt4+wja8vKYnKRbPA6+u+WJrdhkGIT UQYtBHhY78QIBVi5TqdVkEixTEd6gwafSqZBIiH72pRIa21lX8FpMduLVJSkHN5rG9S3 X4BnWIP82TWP6fsiSXtOAq+vNd+BjarVmrAURXk+96ek2YLuxXYJDWBYPB6TW739/prh Kn1+N2Hg6/fWek4uuey/JDnim9N03OmkdA90wadvj40id6+VTwIMqhoJSb5LufSg4ea6 BpGsRs/qndUmh2779DO7fI2m3JpYH5+u1gI8J2I5ubsiIzrYkh0vmy2xArPJguJlX9Zy PVEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LqSgevMKrnKOuaMi35EpQEVjNRHj2C99lKB2HFrd3mU=; b=qgAivuI4DCMTTXRYQRgb3LyGd0kmfttwBo33kvjwxNL7q3mBYUxI4WnBt9sGIFmcNu LUvW5dilZgFfqDwx5SfJh0BQBloTA4yi7vBgN4YErvPGtyfNcy3pRH8X4OM9QAldT0ya 7Ma2j2dIr//RWRvTmS5s22bJxckU6zN4g2bcR4L6uBW+915TLXXnylY9ufVI4GONMTwD OaqLM5qCYsRp7OZPULfk5rbpin7RJt4qLyZc2Knk9XgMxy9d1qvaCFYM09ZGWKbPW9Y7 O/oFUk8oAhuYAJC9T27pVijOtdLOVMauNe9/L55Dq0iPm3anTpr1yDBz1CERjVOeQDdA 19Iw== X-Gm-Message-State: AOAM5307FjID+jwZLsyPjbVzZXLNQbByCfLo+Xv0VEPsRvGXSHFPLDtX JfSiGQswjp+/nWoa85JmffhZAY2oMDk= X-Google-Smtp-Source: ABdhPJwKa2PpbIq+9UjSA//wRB6wHvEEcut8e7/X0HXMIRFWAyCp/oqMS1k26Y6/FzWuASt+K+TA9Q== X-Received: by 2002:a17:906:fca:b0:6f3:e2d8:7c57 with SMTP id c10-20020a1709060fca00b006f3e2d87c57mr2316155ejk.320.1651292063068; Fri, 29 Apr 2022 21:14:23 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:22 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 03/23] archive.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:46 +0000 Message-Id: <20220430041406.164719-4-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- archive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archive.c b/archive.c index e29d0e00f6..654ea2a6ed 100644 --- a/archive.c +++ b/archive.c @@ -465,7 +465,7 @@ static void parse_treeish_arg(const char **argv, } tree = parse_tree_indirect(&oid); - if (tree == NULL) + if (!tree) die(_("not a tree object: %s"), oid_to_hex(&oid)); if (prefix) { From patchwork Sat Apr 30 04:13:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833038 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08F13C433EF for ; Sat, 30 Apr 2022 04:14:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240894AbiD3ERx (ORCPT ); Sat, 30 Apr 2022 00:17:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240814AbiD3ERq (ORCPT ); Sat, 30 Apr 2022 00:17:46 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F056F3B02A for ; Fri, 29 Apr 2022 21:14:25 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id y3so18664886ejo.12 for ; Fri, 29 Apr 2022 21:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qIphQNVs8nfUWPJKoherI+7RHJsYeZLgJ+i5HFIOLGg=; b=jwQi0ySidkpTqXs/khe0i+KEJ9lH56BtovSmtWYwLz/4CA1a5NH/XFWSgNMQi98kxW PqT+IQGQl1AfgOGZt1YnMcW8lLi0Uh0Q7eGsEq+tBXNGHG69PX1FBfs5ECZ1XzWy9JNA hZg69MW95oTUZysmfp6T0j8hyBDPrU/TxtXnzv9snlhf8WH61Wa1hi+vJtYJWntqx5lW 0FEQ4PNI9ID96GUd1qxCNhqtv6MLGuUi6RGdTuKwgtHnQv0qp5N4aCshKuSSF3KR/9F6 bKFsq/YTXl9e8xsR8/5YZnS0wgyD0x1URPxGqCCBS50lWYeh0vyvh5CtSTJsX/TVbZ9f vDqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qIphQNVs8nfUWPJKoherI+7RHJsYeZLgJ+i5HFIOLGg=; b=3YY4o6kFwDGNs88EyC19uQHXDXkE18mjFEKs5uD5sG0a7o6cSyf87OW+F0FK2QqJep u/TTINPtGmbdcHNWaELnoXvGGfrMfW+dDCkp3OQXggk1P18XibgjOy3hAkw+chd9hmti RGb8DAnU/pgQJzjLSbarN7zMf3xMc5Kd0Irebn2+wMHjYw02E71OHKtMOSgkK7E91nFC j6VBnmy3rCxyZtrmEyLKXOCyFts34UQHakBT0fOowzLu6B+dDDVJhttU+uIz0AyozqLU PPrjTyh8eKxOKXXtUlDmWNzCSowGMW3/4lENtfkAUqSxJAFs7nblgFyzzT6jZouU5fg/ qZyA== X-Gm-Message-State: AOAM530dinHyeL8R4NOW2rrcFkVkwAXneDXAlqg9DsbEIOufXp2tgKvL ajRHCElk/8mE0LWA0ajac/DogsBxBq0= X-Google-Smtp-Source: ABdhPJwz5sKSC8TuUAwS2IdLVu+SxPgMAS/+RcJhil1CGHntF9pijWsscWOAdZNIKu8chhz4FY2vjg== X-Received: by 2002:a17:907:7810:b0:6e7:ef73:8326 with SMTP id la16-20020a170907781000b006e7ef738326mr2293541ejc.429.1651292064303; Fri, 29 Apr 2022 21:14:24 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:23 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 04/23] blame.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:47 +0000 Message-Id: <20220430041406.164719-5-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- blame.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blame.c b/blame.c index 186ad96120..da1052ac94 100644 --- a/blame.c +++ b/blame.c @@ -1072,7 +1072,7 @@ static struct blame_entry *blame_merge(struct blame_entry *list1, if (p1->s_lno <= p2->s_lno) { do { tail = &p1->next; - if ((p1 = *tail) == NULL) { + if (!(p1 = *tail)) { *tail = p2; return list1; } @@ -1082,7 +1082,7 @@ static struct blame_entry *blame_merge(struct blame_entry *list1, *tail = p2; do { tail = &p2->next; - if ((p2 = *tail) == NULL) { + if (!(p2 = *tail)) { *tail = p1; return list1; } @@ -1090,7 +1090,7 @@ static struct blame_entry *blame_merge(struct blame_entry *list1, *tail = p1; do { tail = &p1->next; - if ((p1 = *tail) == NULL) { + if (!(p1 = *tail)) { *tail = p2; return list1; } From patchwork Sat Apr 30 04:13:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833039 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99A27C433EF for ; Sat, 30 Apr 2022 04:14:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241724AbiD3ER4 (ORCPT ); Sat, 30 Apr 2022 00:17:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240830AbiD3ERr (ORCPT ); Sat, 30 Apr 2022 00:17:47 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D2DD3B029 for ; Fri, 29 Apr 2022 21:14:27 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id a21so11075039edb.1 for ; Fri, 29 Apr 2022 21:14:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5piAnsUWzQE1K3AhbFvjSOycNDq1Abcd0E92dt75pw0=; b=Ks7gv1LjWKK0WLGDzmqIFmbojOSa5UifnuhkMIHVxi9nHmJ3PUNFAFvJzkd40v9lj8 RMojj+v4h1MKJr+98lfIRq0rhMjSTIQe9seoUvfM0LYQd9TB+q5EvK9WKUs7jnxoVvev Pp+5mBY/y8AbAz2ufMBrMFlxPt4oOJ1vUjAsvv5hlifs2joMNKNpsMmfv1NMz9RgLsUf xTQTcp+wP3d8wNjb1BI/BE3CTFai7hxfB8bPzy8bIal3JYRpPLkYu4Wty/ZoMbZfrkIh vI3Epi1XIYUBGN0m/uOUgodh2VIhKKmSd6uxkDDl1Y7V47TC1UHs/FMC3FsTGRrmxK5p 9n/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5piAnsUWzQE1K3AhbFvjSOycNDq1Abcd0E92dt75pw0=; b=VCFBVawY/277c4WbCzBziwkshu6jw7sIjxzJHT5lFC//1dtcIpapMSm4U89G4aARe/ ea2bs1bvzRAsrIXOldLT8LEOmnw93SNZ0zHsoB/bP7lZ72PVHXKWXLoasdb+5Cemjf6h Rco5V9m1Q5FiY7dNL74kcNJ0HIpY4y80MEjjSzf9DqjtnNqQ2bndhrQuudA3QBs9jV/q cvcjOVp7Cz3AKuV36v1wfBI/DFtVWjf6Cu2LOwVKPqGCO8i7nA/ruvHPuaRRGNfMma/V DDHi2bc7/pPuWz7Vcso6COmH8aLO9gA+D+zg4plWyXSxqzmXHH2tpWt0i9SCCWju3111 R9cQ== X-Gm-Message-State: AOAM530Uuj8K4OrbtIukRDJHP5E1R1h6ftc+xzgjQ8+U8ZoS3AkcV683 7Io4ikiSSHbcvfhROjyUrUHuzaME1ho= X-Google-Smtp-Source: ABdhPJyS/YkO03zy5yj3u5aegwB6TYjTprVoL8D4PeCINp2AFnfoYzjYOKMi+dJCJCItedY6qaBhBQ== X-Received: by 2002:a05:6402:2932:b0:425:d7b3:e0d1 with SMTP id ee50-20020a056402293200b00425d7b3e0d1mr2647693edb.141.1651292065784; Fri, 29 Apr 2022 21:14:25 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:24 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 05/23] branch.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:48 +0000 Message-Id: <20220430041406.164719-6-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- branch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/branch.c b/branch.c index 01ecb816d5..bde705b092 100644 --- a/branch.c +++ b/branch.c @@ -466,7 +466,7 @@ static void dwim_branch_start(struct repository *r, const char *start_name, break; } - if ((commit = lookup_commit_reference(r, &oid)) == NULL) + if (!(commit = lookup_commit_reference(r, &oid))) die(_("not a valid branch point: '%s'"), start_name); if (out_real_ref) { *out_real_ref = real_ref; @@ -653,7 +653,7 @@ void create_branches_recursively(struct repository *r, const char *name, * be created in every submodule. */ for (i = 0; i < submodule_entry_list.entry_nr; i++) { - if (submodule_entry_list.entries[i].repo == NULL) { + if (!submodule_entry_list.entries[i].repo) { int code = die_message( _("submodule '%s': unable to find submodule"), submodule_entry_list.entries[i].submodule->name); From patchwork Sat Apr 30 04:13:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833042 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3585BC433F5 for ; Sat, 30 Apr 2022 04:14:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378907AbiD3ESF (ORCPT ); Sat, 30 Apr 2022 00:18:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240874AbiD3ERu (ORCPT ); Sat, 30 Apr 2022 00:17:50 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94ECF3B029 for ; Fri, 29 Apr 2022 21:14:28 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id n10so1290289ejk.5 for ; Fri, 29 Apr 2022 21:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y/4CGgdxWMbvnxtbbUHxyXriwUJYnjm/PkB2an081is=; b=locJmYI9no+6cxqeOG+7yeIUn8kAbQlqlOFFN2lMiRNzTrMO0PKO5XIKqQ3sVvHJbn kPUkdDt7SYQl4bqGXls8i1sKfVHSgMAWZhs5SLZkCbbiHPv3ndNRd5pOEnr5Geba55+N RxwIhpz2E1IaiDvj6YSBljc7wKA+EjXdYOQMIWR61CEwmHSM2tV2DVG8lFp1oXYx9GBo KGdioztBVfDN4yYx3zCLVc+yTjQqg9HBV8USEh+c/rrqC5Jibtd6UAfZ1dl6/jKpm0wC NwCII7aoVNCFUv9W8sCxYojO9CKwgZ6ATYIfMZjJ5Hl2Bcj36GlFAhBfZuDWh8H84k1Y 45vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y/4CGgdxWMbvnxtbbUHxyXriwUJYnjm/PkB2an081is=; b=tqaTdr4vIGfOuZnNA6kMencVHSReFXufRIYVQ0PK3H5b02yJWpLcLbE1dq2Dyxi4r+ KfjezYUdpJ7LCYzKWWqfPm/LAuQiVyRg6qm/cgzvLe4bNndcqQWHp5LdaeD+Mw7k5nme HVSawbTfJ8EEnMEPYwxMmvTDllNATjGOJXbrxjfV51oxU4C/ZKEC+eeRwcxL43kP+Cpk kzGjZkrQniJGBs9jp7PCbtE4FeGY8PX/b3XVWIaEbBdsNdND2g3YhboA0uwrr2eCxqo6 TQvzwg7U66lftVzYcSyE2IzlBHDIDxkbeO5I5N5CdM3OKVMtMgwxkxQRESvbFhzLdgzK p2jQ== X-Gm-Message-State: AOAM5306yT78lXTkWy1wjlyKREMPvVJ8iGxlnCZBWdXcAeVREaB5BXM9 jEZtqf4iVUt00XGHK2Q72Ujd4P17nfg= X-Google-Smtp-Source: ABdhPJxeDNNTAbxNEDw75PPtsk3F25HXI/6r2psCEptoXiCbL1XBrbWUSQvKldWehclHavKDhUHWgg== X-Received: by 2002:a17:907:1c8a:b0:6e9:2a0d:d7b7 with SMTP id nb10-20020a1709071c8a00b006e92a0dd7b7mr2274831ejc.572.1651292066919; Fri, 29 Apr 2022 21:14:26 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:26 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 06/23] builtin/bisect--helper.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:49 +0000 Message-Id: <20220430041406.164719-7-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/bisect--helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c index 8b2b259ff0..e432e1b0ef 100644 --- a/builtin/bisect--helper.c +++ b/builtin/bisect--helper.c @@ -433,7 +433,7 @@ static int bisect_terms(struct bisect_terms *terms, const char *option) if (get_terms(terms)) return error(_("no terms defined")); - if (option == NULL) { + if (!option) { printf(_("Your current terms are %s for the old state\n" "and %s for the new state.\n"), terms->term_good, terms->term_bad); From patchwork Sat Apr 30 04:13:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833041 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44604C433F5 for ; Sat, 30 Apr 2022 04:14:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240941AbiD3ESD (ORCPT ); Sat, 30 Apr 2022 00:18:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240812AbiD3ERu (ORCPT ); Sat, 30 Apr 2022 00:17:50 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD8BB3ED0D for ; Fri, 29 Apr 2022 21:14:29 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id y3so18664984ejo.12 for ; Fri, 29 Apr 2022 21:14:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ik0vBSPiXSQAVyMhMuS8PJGmWtqvcnSXOMSfoVUt09c=; b=RTZcEYbwqyNisPhxpS22a9yR6WBZU1IQOTBaCGfTnV/y3X+CdcGMJFMZaaNGyhondo P4ZI77hFAYPq3ulOckmEolAwD3Ue5WhSozxbVeJis3VaX7t5K07mMEegEpzM1XewopFd 3T2rydZMkXywlMYL9hhsv4G5Nl4zq9+OIg6DqiCRDo7XdI9nwsenarse7AaPAUrF4Grv uYmuGs/04n2I0aNUw6D4aBR+wlLCJV5fEISkF0KPTI5/mei9zYOIhTtXGMJVHIsEBjjq B7HlW3f2mhRHrPS3i0MAhW+/kCZR/YESRIytz2oZLoUlM28X9VTL91CkVNXexYTA84qA nF+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ik0vBSPiXSQAVyMhMuS8PJGmWtqvcnSXOMSfoVUt09c=; b=SgqCjgvKTN2vmv5E4TzXVlquY07lmJfiQ2eamYMp303ksqS2wWome2OMrMRfSfjrdB evve/V2QYyhuiJkzcZr9QO/c2FO1UHaI6SZUvu+RSnkGCnJShV+l7XUECZLezQYB+mCR TnwMpJ19ae101uTVBGKFosI1hJrt8CIX6Ns5GDYzATvwHolLPp1fcbhsSUXLXIONm8M8 ohv/a6x4wdTHfC2sW5Gh/gC6OItXVV13Ut9BIMwZgcT7EcSTygeXkDellC/c/INT/w9n oZSjtIf7CaI1KFVo56JzLpd5p4kJq5BAk0drA7cFFN+colTClPC0UEptObtZfoXhRr6F yilQ== X-Gm-Message-State: AOAM5335CFfMIFhCeXMHLEBdGu7T6WTrHERODwQj7w32hbaS1FefuIFE oSK5Gdqz9CB9Fy71WJBZ7G7t/eRvmYg= X-Google-Smtp-Source: ABdhPJxpNlz2C1cIIoXHM8wwUt49oNFJxI68RVAXW1BYxu3zLwBVLtKWFlrcH/m26kEovNCi6i5evQ== X-Received: by 2002:a17:906:1b1b:b0:6f3:9044:5fb4 with SMTP id o27-20020a1709061b1b00b006f390445fb4mr2244226ejg.763.1651292068076; Fri, 29 Apr 2022 21:14:28 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:27 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 07/23] builtin/checkout.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:50 +0000 Message-Id: <20220430041406.164719-8-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/checkout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index 797681481d..f988936ddf 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -834,7 +834,7 @@ static int merge_working_tree(const struct checkout_opts *opts, if (ret) return ret; o.ancestor = old_branch_info->name; - if (old_branch_info->name == NULL) { + if (!old_branch_info->name) { strbuf_add_unique_abbrev(&old_commit_shortname, &old_branch_info->commit->object.oid, DEFAULT_ABBREV); From patchwork Sat Apr 30 04:13:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833040 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35D85C433EF for ; Sat, 30 Apr 2022 04:14:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348071AbiD3ER6 (ORCPT ); Sat, 30 Apr 2022 00:17:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240911AbiD3ERz (ORCPT ); Sat, 30 Apr 2022 00:17:55 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1D3743494 for ; Fri, 29 Apr 2022 21:14:30 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id g23so11043141edy.13 for ; Fri, 29 Apr 2022 21:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HjqV85PaAutsk++HgCN216zejZCJ957aydexbqCLzhE=; b=bW8mEo18Jcx6tDqIchYh4papEb+RI3KSlMWvxBaQeHzt/MmVovuJw4u9viqwmjOuKy b7HFdhrNTr3UIiyICxRAamyIo0WvomiH3Hv8Xymi0cSJwNN1CtWFH/AWPlDvS+EVcHza mcAvBJgX9cPaZmLavhpsreukipys7Q7fURModwRyyKBeSX9jsaCPf1jLWQRKcct7m+mE g5XRcBoHLM33Rpuq2FtYP7cEPx8/D+jsDmLoolDsqLfhARCXErHqITxr7DBEtq8yNc6x Va1MQNW+De/8y5YYU2iKd1ZnQrdaDqb2MV84k5HCHVdWZTGnQBnzWwtHfY8KYKXacGoB r9Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HjqV85PaAutsk++HgCN216zejZCJ957aydexbqCLzhE=; b=CFfQsrkm1z3bzawYkBn0vVuN91jDvBsRE9gBO9xXPUqVxL05ETKWf4HAP6ZaHHl7+W nwpYskkDjrtFzu5f0omUuuR+yZ6XWS2ETm4+MDVpLRwVaeA1V/5UB8NKJFtKnHJ2uFER GxAifUdOiEahpF5v/U8ldKgml/i/tom6+BTyX3zv6B8SBTho8G2JipkRtCGz4PYqHoZJ 3GeEZgDJiHM+w6TuKhhsnYWmamJt7V7CaPuhpvQoD/Gm9xCCeF7AkzaYwnt+VasfWdpI 0iaJXt3BibP/Ak0BLk0cub7IgyRbH4v8Lb5zJ6g4habKkH0Y5e4eKaHSSiZrHsEuOcEP aJjQ== X-Gm-Message-State: AOAM53143jGw9BXSDZzZRvsrFXgjlOKObpX/XO+cn8+SOK5OFR+shimz MhZMSkih12xtNbLjqFJHjVx+jMypLTI= X-Google-Smtp-Source: ABdhPJypku7MpS/BXjjVSR3lefRgrk+2D6mrA8VbeyLhNlLaVGIkeIDPOtIEDBE9DtnnlvqZjxQb2A== X-Received: by 2002:a50:bae7:0:b0:425:c0fa:e0a7 with SMTP id x94-20020a50bae7000000b00425c0fae0a7mr2744306ede.104.1651292069237; Fri, 29 Apr 2022 21:14:29 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:28 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 08/23] builtin/clone.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:51 +0000 Message-Id: <20220430041406.164719-9-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/clone.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c index 5231656379..05b004bc0d 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -1106,10 +1106,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix) * apply the remote name provided by --origin only after this second * call to git_config, to ensure it overrides all config-based values. */ - if (option_origin != NULL) + if (option_origin) remote_name = xstrdup(option_origin); - if (remote_name == NULL) + if (!remote_name) remote_name = xstrdup("origin"); if (!valid_remote_name(remote_name)) From patchwork Sat Apr 30 04:13:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833043 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5833AC433EF for ; Sat, 30 Apr 2022 04:14:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382175AbiD3ESI (ORCPT ); Sat, 30 Apr 2022 00:18:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240997AbiD3ER4 (ORCPT ); Sat, 30 Apr 2022 00:17:56 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E58124A92E for ; Fri, 29 Apr 2022 21:14:31 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id n10so1290452ejk.5 for ; Fri, 29 Apr 2022 21:14:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K41Re6xEqzz+OQgoWypHT6sjfORYxoUQDCVAmvJvlIw=; b=j9ndINR++1W3aK1qBjTZxWb9f78JWXUJZ78wQXgak4d3cAzl/nTjbZbwPiiPZEg+fL XSlcJmus8IXh3j9qUwR8TMZY6bkthYFj3rUqgwKPbOW7t5bQSQEO2gNCWoX/L9Qv1LEm nId49zQp5ve73HsSmIlniKq1Uq1q+thRpZ3OHE9KwXrCEhiU2+4utmiikmDCIlYlJvNB eWXZAz62jkaJaBmyxfQvYNKqsFDHSjPRChLiO7rtl2qSWwcwdWCZ8CFHi91xoTCK5wDb DM79ge7+8B6GSmmL6uXI4HJfkRWYjUaCpJHxIGVqLCVczpOtp6OrHLFCe8usQ0qjUSCA j7zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K41Re6xEqzz+OQgoWypHT6sjfORYxoUQDCVAmvJvlIw=; b=TsVEAk1I3LAueYU7eUK7RhcLhv3Zrg5aEMXk2U7nba2jmV0BsmeXY9pYms7dOcdF6n 2U2zb29+edViW/xVRKrwE4fkjzQgKpJFldHp4Qs9R1c6zKHPcAQd0YrVXn5DlmheFNAS VREGl88mz71IASZKbb+NWLXCbqGucqLrFMBZ+VKlGEDx2lG/lWAThFEUad1pAKjw2kOH uWWOUKEFboQihqjNxV7N1QYGjKgYww98+rhaNSIzwfANbQS+EYF4GGSYz3uVplxcA3fy ZXlVjyAOucYIFKTHhai83KsIS5PGgdFaDZcv8okA0ki5M1BlluRU6a+u9rW6KEGZ5Xt4 lqkw== X-Gm-Message-State: AOAM533+PMy1cxtLx11kzSNWAiuKSzDcsqugXAg1+nH7k06TO4giO2yi SyKeNQAH6lq+qca/xoNui+3qAP2W0UE= X-Google-Smtp-Source: ABdhPJxYVuEVWOdViRhqP9GhKxTV8KB7QaT/q3vpV8h4nkRTFzJ9jSTRl3DPwRuO5NX8hlfQ9aJG3g== X-Received: by 2002:a17:906:9b8f:b0:6e0:6bcb:fc59 with SMTP id dd15-20020a1709069b8f00b006e06bcbfc59mr2360693ejc.624.1651292070268; Fri, 29 Apr 2022 21:14:30 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:29 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 09/23] builtin/commit.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:52 +0000 Message-Id: <20220430041406.164719-10-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/commit.c b/builtin/commit.c index 009a1de0a3..7316fbba1d 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -861,7 +861,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix, } s->fp = fopen_for_writing(git_path_commit_editmsg()); - if (s->fp == NULL) + if (!s->fp) die_errno(_("could not open '%s'"), git_path_commit_editmsg()); /* Ignore status.displayCommentPrefix: we do need comments in COMMIT_EDITMSG. */ From patchwork Sat Apr 30 04:13:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833045 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8639CC433EF for ; Sat, 30 Apr 2022 04:14:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382187AbiD3ESP (ORCPT ); Sat, 30 Apr 2022 00:18:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379881AbiD3ER4 (ORCPT ); Sat, 30 Apr 2022 00:17:56 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3C85506EE for ; Fri, 29 Apr 2022 21:14:32 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id bv19so18724273ejb.6 for ; Fri, 29 Apr 2022 21:14:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j9ltjhMmfk+bIp4Wo0KYJMRqgKKGp5RYbkY19gXo0RM=; b=Dpjws8rfsTIsCJ6AAYWGzi31VE4Ct2lvKthe7MOyQWMcBfmde6DJjQkup5YZD4WBnz 1Q64Vo9ie9h3DWk0lxZIm0Eyq27taSRP8ytuPsuiZ7fc99uPVssQf+/uP6YBF0rF/RCt y9EyDBorZiJ3DxfVi11cuVBAG7RZApHbPmVsr2/WMZpZWzT4ShT4tRMdtdMNNzi24cuK wKSvpaCRcQK9fqxLjaVyxGCJogypUjh4b/MkvVTRlxi0WKebUVarSpappqmQU8nqsY3V b6R4nQqEt4W8WvsWRv0ejDeY0qFtZCaYKaZWF8chsyK5V20WzOJTv/EIJzwxym2vec0j URoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j9ltjhMmfk+bIp4Wo0KYJMRqgKKGp5RYbkY19gXo0RM=; b=8CaagtRNb3BKzQDeoF7p8wxxw6dRhVhW1R8Cr8DRw602s2ZO0rNIKPXDxAvzdLFwfz lZ45Mpv0/CYYXrpabZFr5avIR00dXeyCq53271SMLt/tqHGGbNvFOnSlxI7mIhv5mpe0 uvi0u7Xdt95Wjx8th6t0m4+fffT0NWKONUtwr9tEvxBe4o9pRpXtooz2qGf4uIQuSHLv an0lTam51ai+mkf1otccGg9nHWUqJsZiRqANlJ8OUYV+4/bkQhC8G2r7yuAAPWlyqjM4 cBQ64RncGSYH6dRIihMk59mmk9vJ6PkvhG1WsuAjxO6UENEeJJIc8Se0kzyqfgFDo4QN sMWQ== X-Gm-Message-State: AOAM532J1PzXHOf5+o+kD/F1ogu8u8RE+sHn1CK7BDMS5LpxLOGh/B2M cspXK1qL2Wo2iQ5Is9gzAij2uFYVk98= X-Google-Smtp-Source: ABdhPJzwkyk8Ly9y53LmwNqP1Bg/bwKIcUM1UgM/OIZRXe/JMqQhiKYqhUCA6YjnmQH37iFrxVfGEQ== X-Received: by 2002:a17:906:c149:b0:6df:f047:1698 with SMTP id dp9-20020a170906c14900b006dff0471698mr2361160ejc.16.1651292071312; Fri, 29 Apr 2022 21:14:31 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:30 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 10/23] builtin/diff.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:53 +0000 Message-Id: <20220430041406.164719-11-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/diff.c b/builtin/diff.c index bb7fafca61..3397f44d5a 100644 --- a/builtin/diff.c +++ b/builtin/diff.c @@ -352,7 +352,7 @@ static void symdiff_prepare(struct rev_info *rev, struct symdiff *sym) othercount++; continue; } - if (map == NULL) + if (!map) map = bitmap_new(); bitmap_set(map, i); } From patchwork Sat Apr 30 04:13:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833044 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B398C433EF for ; Sat, 30 Apr 2022 04:14:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382153AbiD3ESN (ORCPT ); Sat, 30 Apr 2022 00:18:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380990AbiD3ER4 (ORCPT ); Sat, 30 Apr 2022 00:17:56 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 714B252E66 for ; Fri, 29 Apr 2022 21:14:34 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id i27so18704713ejd.9 for ; Fri, 29 Apr 2022 21:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gL4FhZkbLEwitYYenxLJnMBWMMXE9F6mq5SZAha8J9g=; b=aMz0/rE/VCE7QkcI6jD+L5ugsy17zTAVe8kTqsob2GCOndPSTqJgCHi36i9unTaJac AIH2RUKTlzChC+fcU2O10Nj1oRm5I6FFR6Q5BQrHGrOTMeLEMWZhfRUjf0mvdzQeZF6x TRhlboIz6VbpvgbsFuRAQraM3ltqJxyBKnVySUbTijYzB+KGmTMz/1d+alzfqS0TfKih oVk5op2VQHyGlO7bA6cmxmmsViZ7niMpEFOGv7TPSF/jPJoKA30iaUr//+kC7gmZJP+f +MeiSDoX/F9L//YLaS/x2kVDEOkSmODbon6WJpYYg3xwfJlW8LZPmIx9nngJOSnU/kcH QD2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gL4FhZkbLEwitYYenxLJnMBWMMXE9F6mq5SZAha8J9g=; b=hKqyN1QGStOyxdr0cKAzb8t4SoJVxr0FQBXQ3i9f55aaVadR95T57CnU4oeTI+Kd35 U3W/MU17I4iBDWvjfpoP5Y9S+vkQnnVvcTw/6wZuIpNUa9logL4Kg27qE1XvnExO42JJ F1pbeYE0b+DwqEJlLYTA1KQInEF2znGbYkt+Vs68g8p+WbPzZ684psLoJhp0UXoBQjKy Br8nfVPMtH1Curdw2cgyU7CsWllWNfM4oCtHeZEAXOxDzZ6IJUwD7QOwiY+A2QrKBcPm pM+oVsMM4c7u+woYFF0ay2TuCQ6FundwSuLuUrpiA1sat8mLEG91O124AlGlf8gGoRT8 ml/Q== X-Gm-Message-State: AOAM5326hk7JEnj7jc6ivcZEUHza6LRztzYrIQa9EHj71S6pVEiXWMi3 Ic/byWWaBLOHIQ7gXHYguFlsdIEeAfI= X-Google-Smtp-Source: ABdhPJyEoI5NZuXUsNLkhX4VAI2A+ZHNlz4Dq4WYbDNtby0mG8hK/boRd1NTtGJDLwNHlKnpbP8o2g== X-Received: by 2002:a17:906:314e:b0:6f0:659:963 with SMTP id e14-20020a170906314e00b006f006590963mr2373940eje.358.1651292072795; Fri, 29 Apr 2022 21:14:32 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:32 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 11/23] builtin/gc.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:54 +0000 Message-Id: <20220430041406.164719-12-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/gc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/gc.c b/builtin/gc.c index b335cffa33..daa4535f1c 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -446,7 +446,7 @@ static const char *lock_repo_for_gc(int force, pid_t* ret_pid) fscanf(fp, scan_fmt, &pid, locking_host) == 2 && /* be gentle to concurrent "gc" on remote hosts */ (strcmp(locking_host, my_host) || !kill(pid, 0) || errno == EPERM); - if (fp != NULL) + if (fp) fclose(fp); if (should_exit) { if (fd >= 0) @@ -2238,7 +2238,7 @@ static int systemd_timer_write_unit_templates(const char *exec_path) goto error; } file = fopen_or_warn(filename, "w"); - if (file == NULL) + if (!file) goto error; unit = "# This file was created and is maintained by Git.\n" @@ -2267,7 +2267,7 @@ static int systemd_timer_write_unit_templates(const char *exec_path) filename = xdg_config_home_systemd("git-maintenance@.service"); file = fopen_or_warn(filename, "w"); - if (file == NULL) + if (!file) goto error; unit = "# This file was created and is maintained by Git.\n" From patchwork Sat Apr 30 04:13:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833046 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B947EC433EF for ; Sat, 30 Apr 2022 04:15:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382189AbiD3EST (ORCPT ); Sat, 30 Apr 2022 00:18:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240830AbiD3ER5 (ORCPT ); Sat, 30 Apr 2022 00:17:57 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D5425DA4B for ; Fri, 29 Apr 2022 21:14:35 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id bv19so18724357ejb.6 for ; Fri, 29 Apr 2022 21:14:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lgxYINpx37WCvVSr4DRTBNpzWc4D8M8+z0jHnpK3IWQ=; b=RDEJPDYoZytUxLqpprA+JXoycOPC99vt13jjCpYU3nk2JMbuQl2YB06Cu23ziUOaNp 7rL47qZ7/N0TVTE42Vj3hKSj0njOze7mmbSW3b3nAlmjy7yxLCKbAILHTQKgaqxnWCWs CHSwsnhWUhkFi+tJOPIfO9375JMfbY0IIJspMeuJOzv0G2FPux8S6nJGs4yn5e3yBNxw 2GvGYya530nxr9xLqZi4NU9MV54GXMYtLVG4LirELNdq4kjFamxA7cFhaIiNHWooIFD2 slisilOc1/PmZDfjI2UW8Q0pqHmAZCa2r7XYzXWBQ+k07cb7YTgK2+9MQMFOkJ1c2y3Y Z19g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lgxYINpx37WCvVSr4DRTBNpzWc4D8M8+z0jHnpK3IWQ=; b=hVC2st8p9cuiijFafnbMuexJehX8fu+zSXbVRjNL5ujRZhe2k6/x2pYvaXFzZ0ZNSV +DzyjqdvqMz0lsOetapJycKPOC5Cam1QRRwLgwolG6s1gR97eJypTvj74H72NfyNAN1T 8woxD4IbEE4psnIMgP/WWwI5Ly8QvBkkD7SeXr4qNavZwLIdWyOQ8LPyLSP/wnp6nTgu k5z8GIYcTw/OIxtTnMG4Ngs9inhcZGRwq0pBBI3AldB6k+GgY4l0g7pN/Iw1y2dFXyoz KP3xKU0AGuaogpGZpmfvJ/oGVUetJ9LI/j/esNhO/sI8Xx4PciRlNR0r8/694xISjv7U zhtg== X-Gm-Message-State: AOAM532eIgCaualYsTbA29hi4qNIbWSlVpUHS9lSIPcWNCcDDMmi91S2 /RVJrBi2is6qMh3xquaiO5QiJpZh2T4= X-Google-Smtp-Source: ABdhPJwPjEmMnio3tZyBiStDF1g3eJUxdGlDokQ5bshbMYajFCYxRZAttmKpXiOA89CWMNka+VutBg== X-Received: by 2002:a17:907:9488:b0:6f3:e746:6fa9 with SMTP id dm8-20020a170907948800b006f3e7466fa9mr2299212ejc.12.1651292073658; Fri, 29 Apr 2022 21:14:33 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:33 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 12/23] builtin/index-pack.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:55 +0000 Message-Id: <20220430041406.164719-13-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/index-pack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 680b66b063..3e385b4800 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1942,11 +1942,11 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix) free(objects); strbuf_release(&index_name_buf); strbuf_release(&rev_index_name_buf); - if (pack_name == NULL) + if (!pack_name) free((void *) curr_pack); - if (index_name == NULL) + if (!index_name) free((void *) curr_index); - if (rev_index_name == NULL) + if (!rev_index_name) free((void *) curr_rev_index); /* From patchwork Sat Apr 30 04:13:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833047 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 578E3C433F5 for ; Sat, 30 Apr 2022 04:15:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382214AbiD3ESU (ORCPT ); Sat, 30 Apr 2022 00:18:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382171AbiD3ER5 (ORCPT ); Sat, 30 Apr 2022 00:17:57 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 739C72E6AC for ; Fri, 29 Apr 2022 21:14:36 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id i27so18704790ejd.9 for ; Fri, 29 Apr 2022 21:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4J743f5mV8DgBE4QswkoCcKmeChbj5GsHeZaSLF1rVA=; b=RzahgrtkP66YmXzcMcg9BmcA4z1E7YFzpLy1m/tXiUMWwXJotybY3Rehxane39O0vv G6ygroEZLaXy9++fMMhbVOo2Iw2z++k4TawHnYSOM2Sx6N4v9dELBh8xfrB3yQxhQhzr P6Flz2MIfrl5pBxyF8crHeizB2vSHLvhs/hQ2UxhbE4FGYAwSC6uC5SYl6LpxRVQHzBx eMcArnza3Iop788vuai3ZEswoaL9Ayn8Flw5sjPn/gC9JKind7G3KcXspo0pnuFgIbnD 8Uu1sY2pNdfU+vo4f3RVZQqk1JY8MhtQ707uT1Pyg96BmofxKO2v1EzQKU0Z/9d+vEor vL7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4J743f5mV8DgBE4QswkoCcKmeChbj5GsHeZaSLF1rVA=; b=11TG0Cih8QjdVZj03/MCHOiXROQERPb8NqADrGN0hh5AYyyi5ICaZuleprMDD+DRcK j4l4FoS0pJSCMunhg4CupdP08gXOwVqDP9rNhrJ8HQ1GU5/1Tg0kW7YTGkLZmBlvtz9x 4jgB8r0BSQvXsqnCIfrk7elPIzFBbM01XQasNrp/LC3FBFbCVMHnp6+qNStYXaQ1Q4kY ShcGiAkd3d3e58WDMvBMShfuBLVIrapFpyxOJBAjXR49wh+1npUhDju+fM9lkXlN076S AFDnqdffCcfm/IPU4u8vx9YlQhDn3m3vJ3PwON+tg5IdVnrJr6VgiSRgP1lKSfXvmQwV kq3g== X-Gm-Message-State: AOAM532MYPCQsvgdOvtHkbmAMJ40cRUg4Jr6ybecV4Highfee1cP4PIo uKIfPSPZWx8GRQ6zB9dwK+5FDF9jl6o= X-Google-Smtp-Source: ABdhPJxdKOvqaSScWal6Zu/o3GKVPhp4rg6v2XDbeHeKFAYGDb28nKbRPJn/2rAVE2NVqGrvLsKBWw== X-Received: by 2002:a17:906:f85:b0:6d6:e97b:d276 with SMTP id q5-20020a1709060f8500b006d6e97bd276mr2232997ejj.431.1651292074784; Fri, 29 Apr 2022 21:14:34 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:34 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 13/23] builtin/log.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:56 +0000 Message-Id: <20220430041406.164719-14-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/log.c b/builtin/log.c index c211d66d1d..d35419e489 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1012,7 +1012,7 @@ static int open_next_file(struct commit *commit, const char *subject, if (!quiet) printf("%s\n", filename.buf + outdir_offset); - if ((rev->diffopt.file = fopen(filename.buf, "w")) == NULL) { + if (!(rev->diffopt.file = fopen(filename.buf, "w"))) { error_errno(_("cannot open patch file %s"), filename.buf); strbuf_release(&filename); return -1; From patchwork Sat Apr 30 04:13:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833048 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A9CDC433EF for ; Sat, 30 Apr 2022 04:15:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240830AbiD3ESX (ORCPT ); Sat, 30 Apr 2022 00:18:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382173AbiD3ER5 (ORCPT ); Sat, 30 Apr 2022 00:17:57 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7383443494 for ; Fri, 29 Apr 2022 21:14:37 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id y3so18665268ejo.12 for ; Fri, 29 Apr 2022 21:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ErjLOPyTsUZkND1eEj01rxCRiFS99M1onXETeRo/2UA=; b=c/bMsflciAigFaCPr1n46lE6NMK9UtLVRMczzNco1mKAS5nZXExggXBv+Z3v7zOxZc 2RH2zKCev6QTDwgrkWgHNAx7J5/ZepHnVIMH4DXdyHh6vFR/KV4JXZLiID3wtQRZsaKG FD1Np9nyzjFy28KlUkskW+NvcGv6j8124gpQijGTaBG/M3Dfj/pXN2JF3F801e6O+POY YFATzarYHb/ifS8zC/1TWyn4U88jcosPsHxdnUNVWNDDQo7VPgB9geap0I+ZOkOEicVE xAPLDEAMQdTZyBJAw4MyKLLyFsOUoZwbNM8qZXUu3UmUot8RiLUsoxznzh6BUsQB5tI8 d81A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ErjLOPyTsUZkND1eEj01rxCRiFS99M1onXETeRo/2UA=; b=RKstek2zCx/Gq/Icj++J1blMo0H+IKPwk2naSIt/9IsHcQOkZNTADFHe3vHyxYrNPq skCDYjidtWKUC1qZY0ha8AI/CNkkp46DCGxtTo/2mGhNy2MlR/Sc1wchY6vpXde8CBjl RFmmtl7y1KYsPpJp1sxZpjRwmu9RArP9eQB8fuYwcCQcWKlyBPfE/vKRTpyW3XzB5inn lHVN46l34QLaw8VH2sSlXhkEteBFaPgzkqFrAfohJmqh1csBSQchUDtC7/S1N/5pidtk VtCgN24LGY2YpGhC9y33MyA9hq4CnRAV/Hrfav0s5yDhsLNuPWVG0Xvj/q4UeexvVImX 3hkA== X-Gm-Message-State: AOAM531ESxnYA8drZLdKHU7l5XSv37aElQglByHztwB2exNk4yEF/LEE BfdOm/2y8eoLJZtEqDKB/C0MiVQF1wo= X-Google-Smtp-Source: ABdhPJzev0buCOxfi+2pJSCLXg1+HgiknaF3tcIOWTA4EjcAS84+fROS24XYd9ghnIxVDFvDDaK4kw== X-Received: by 2002:a17:907:6286:b0:6da:6e24:5e43 with SMTP id nd6-20020a170907628600b006da6e245e43mr2268441ejc.449.1651292075777; Fri, 29 Apr 2022 21:14:35 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:35 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 14/23] builtin/ls-remote.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:57 +0000 Message-Id: <20220430041406.164719-15-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/ls-remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c index d856085e94..df44e5cc0d 100644 --- a/builtin/ls-remote.c +++ b/builtin/ls-remote.c @@ -114,7 +114,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix) } transport = transport_get(remote, NULL); - if (uploadpack != NULL) + if (uploadpack) transport_set_option(transport, TRANS_OPT_UPLOADPACK, uploadpack); if (server_options.nr) transport->server_options = &server_options; From patchwork Sat Apr 30 04:13:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833050 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BAA5C433F5 for ; Sat, 30 Apr 2022 04:15:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382195AbiD3ES3 (ORCPT ); Sat, 30 Apr 2022 00:18:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346101AbiD3ER6 (ORCPT ); Sat, 30 Apr 2022 00:17:58 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F54C488A5 for ; Fri, 29 Apr 2022 21:14:38 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id i27so18704869ejd.9 for ; Fri, 29 Apr 2022 21:14:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PZ0fLCsxIheyHQMUr0wpmTX3ugCBZnvtYQXjDY3S/hs=; b=k7mHTXj4NPn1waMuVSASzZy/DS/8DQ8bDz7cNMokLAUgVrT1WY+YsnWVJvKUK2ss9Z bTxn/slsQiwP1ecf/2ZexOZBwyq8Nngg4XW0RJ4OKIjVbmF2nU6uhRUTFS6K647YbCn7 Exo52QfiGhCNAOM6K4Jt0Ct1lbuSqCh5ELWi3WSG34f2wuR4YnzcxidveI2RiPnSo8A1 nJ8S6m/48GbCBro/MTuqXTf1hoq5UA/fbJGBFqU67sIGsEqzLb1PtXmX5RBgJPvmdFsR DsQOpFsyM6+GeGvGbJu/3SwGpM23z/ikzx4Oqf1h08qhNHuS3OxF/cUz6KhAmz2QOPDX QOsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PZ0fLCsxIheyHQMUr0wpmTX3ugCBZnvtYQXjDY3S/hs=; b=GKb+Xdjsw/R9F6HiZFamEJjzj2L9AuUa6XEkkUjEBRQYaqScqlXzTPtepeGYrK2z07 pRkbPR/UByxTZfyWPOjapGYn5z+ODfWkw+CZz9DowK08obANincCQEA66CKySfal/0ZV vIwSUhfytjK0MfdgHZayZNDztyu6NzQCHX/pLBEGLhGLquUuFqA49OaWmH9cBbJyVSaO srGz8iF0u63yIjevqt+f3rMZuTIPQDDdWQHAPevf0E748TUx6p8N4UMP8JKCHhi43FGl 312mWDkdLs84JBHZ4duryjrHaTjBm3jeeYRUPU92U1RA7uFsgzZKVYluIHpZqX8ao1oI 0Itg== X-Gm-Message-State: AOAM5306jx9rcclkoN4MQlKZr11ZGSRyhpZxXHb3fD9QKn1VCyCxie92 zbMFMhG8W+DYqznXmx/Ieb/AwzwJGVE= X-Google-Smtp-Source: ABdhPJwgjzjV4KzbfD47UYxWbWfdh+h07y19rzOwlLaHAcN/lHLOPG3Gx4k9p+hc50AWDhiLEjn4tw== X-Received: by 2002:a17:907:8b13:b0:6f3:9216:b73e with SMTP id sz19-20020a1709078b1300b006f39216b73emr2466116ejc.188.1651292076930; Fri, 29 Apr 2022 21:14:36 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:36 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 15/23] builtin/mailsplit.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:58 +0000 Message-Id: <20220430041406.164719-16-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/mailsplit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/mailsplit.c b/builtin/mailsplit.c index 30952353a3..73509f651b 100644 --- a/builtin/mailsplit.c +++ b/builtin/mailsplit.c @@ -120,7 +120,7 @@ static int populate_maildir_list(struct string_list *list, const char *path) for (sub = subs; *sub; ++sub) { free(name); name = xstrfmt("%s/%s", path, *sub); - if ((dir = opendir(name)) == NULL) { + if (!(dir = opendir(name))) { if (errno == ENOENT) continue; error_errno("cannot opendir %s", name); From patchwork Sat Apr 30 04:13:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833049 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86F4AC433EF for ; Sat, 30 Apr 2022 04:15:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382177AbiD3ES0 (ORCPT ); Sat, 30 Apr 2022 00:18:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357504AbiD3ESA (ORCPT ); Sat, 30 Apr 2022 00:18:00 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CCEA3AA56 for ; Fri, 29 Apr 2022 21:14:39 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id y21so11075578edo.2 for ; Fri, 29 Apr 2022 21:14:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z07EZ5wZW6TcHs4qgsCv46FQpUpTOc9rtYErKTAeasc=; b=QiFfSpBZm5gSpbQsUOTCHXz9K5SZRlvA/KGYIfDfiaLgrUxWXA6REG3aoMumZw9H+0 tURG+9kyPAo8il55OTkbAfr+v0vsKI1SGKkujxSBxWIer4YnQSWnAZ3fvOqr32E8Ck3D Kzy17amauJGAoB+yVIihMk4xBL7QDBQGuBEAlhI492VgCk0hWT/68CNk9Ht3a1kviMP1 3OnTLzK7EvGqnAMw1p0kwxALPrCJtwKKjB8JI1GuGFE9SYpO6vlZSDNvy38l3FoUXjaq ONKCc27A89Jcp3YIjEYTMyMMAjny5bMKw3oUvQp228hslauXrGgtfEyVw5+bm0XZubXc D2pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z07EZ5wZW6TcHs4qgsCv46FQpUpTOc9rtYErKTAeasc=; b=hRL/nIEmz+ZCuwuYJLBYi5EI09xWZOBTT+5fs87SAhz9KGBSB5a9W7487MWEanR6y4 KuWRGrqN2RGHzKYEY6XcLe9T/j9adzuRyZYbtnYBcAOSFry3pwAtTHPi8653tVfY9CK3 jNOMnGnG9HzPemWpLrrBfK56bCdRXycdYkezajK3l26kX7Y64R4cCL2wyv6MG/dzQoMs uAd+lTaYqMOsDMBOr8k3waWKO/4m0OOBiXLFMNnNHuGIyJkkZE8V9i2C3OsbZV5U8B0p qaEWJ1UzJkj7hVn/dEMEw1b+ULnElxnvyhQ6sF/m5biSu8OHOPqPh+T67mDDVvPVINpj LJew== X-Gm-Message-State: AOAM530luJ4vc7bkSng6uKsFCbODF9wSh+yHj+x+0TlgJkcF+pvQAIFU 1GZdRRnEEPJ9myimiPqXZjZT7Cs2rho= X-Google-Smtp-Source: ABdhPJyrrir9Thz9bstlIhr0aEz8MV12xF05YHr96M8pUeoFBMB3ljum3RPH8okhlnBh1JxMwXezzA== X-Received: by 2002:a05:6402:2806:b0:420:713f:b5e1 with SMTP id h6-20020a056402280600b00420713fb5e1mr2639895ede.93.1651292077952; Fri, 29 Apr 2022 21:14:37 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:37 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 16/23] builtin/pack-redundant.c: Fix coding style Date: Sat, 30 Apr 2022 04:13:59 +0000 Message-Id: <20220430041406.164719-17-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/pack-redundant.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c index 8bf5c0acad..ed9b9013a5 100644 --- a/builtin/pack-redundant.c +++ b/builtin/pack-redundant.c @@ -101,7 +101,7 @@ static inline struct llist_item *llist_insert(struct llist *list, oidread(&new_item->oid, oid); new_item->next = NULL; - if (after != NULL) { + if (after) { new_item->next = after->next; after->next = new_item; if (after == list->back) @@ -157,7 +157,7 @@ static inline struct llist_item * llist_sorted_remove(struct llist *list, const if (cmp > 0) /* not in list, since sorted */ return prev; if (!cmp) { /* found */ - if (prev == NULL) { + if (!prev) { if (hint != NULL && hint != list->front) { /* we don't know the previous element */ hint = NULL; @@ -219,7 +219,7 @@ static struct pack_list * pack_list_difference(const struct pack_list *A, struct pack_list *ret; const struct pack_list *pl; - if (A == NULL) + if (!A) return NULL; pl = B; @@ -317,7 +317,7 @@ static size_t get_pack_redundancy(struct pack_list *pl) struct pack_list *subset; size_t ret = 0; - if (pl == NULL) + if (!pl) return 0; while ((subset = pl->next)) { @@ -611,7 +611,7 @@ int cmd_pack_redundant(int argc, const char **argv, const char *prefix) while (*(argv + i) != NULL) add_pack_file(*(argv + i++)); - if (local_packs == NULL) + if (!local_packs) die("Zero packs found!"); load_all_objects(); From patchwork Sat Apr 30 04:14:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833054 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69ADBC433FE for ; Sat, 30 Apr 2022 04:15:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382219AbiD3ESu (ORCPT ); Sat, 30 Apr 2022 00:18:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382181AbiD3ESK (ORCPT ); Sat, 30 Apr 2022 00:18:10 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D04C462A0F for ; Fri, 29 Apr 2022 21:14:40 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id g20so11051779edw.6 for ; Fri, 29 Apr 2022 21:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xlyKKTyaRb2sp2l82Gj4l7mCchkDYqxr2hGfoFBJ4ZM=; b=FCQ4HyYxpBlLFh7f/0ZDEgtxWU7uvpJ2rT5rv3MvhBEDsuC8TTnN+fELojUDFjeKmq ehaet/vdqaou3TmIar5Am41EWwCS2aww6reJkW9FVJTNTCpjhp4AKMM2rdKWlpnNKZod fy9ZPsJz12YhLOPwy9gXO2ivyRa66TVvs1Qk8Bn26JQadKV1dyjY2e++mQfg7JR+Guyz UdGIy+IsqxfxVhtKiWNYjlSUif0MkRgLHEldDQ+Ckl/4XmcjQeKzusJYDuzaPe4tduzF 5b01H37htC8CVyd3mYC8LcBkqQjUvLLFvYTfrRwTEb1HZFiVqT7aTfnEAGVit0OS+tzI QmRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xlyKKTyaRb2sp2l82Gj4l7mCchkDYqxr2hGfoFBJ4ZM=; b=j4T/Pk/G/jsf4Y0NKfM0uKREmhJ8RZRqj42Io3vPyuVejkAdx3ys02G3DG2mAFSq7Q r/8xNXkaeqS1Nnza7vnqcUF1OAm+HNVNYTJh0k2fQfspUFg/zfTrdekx0q0eEHB9Ku2y LJgB8XR8NGrDNGb8S40617YgHAbqBty1v7saaR6cdjO2oRjWiDe+TxTc3dMwQ7shJr66 GhDbmWXHIFPbBpxIAaIKUhQv0xIhF3AoVIs9Z3FsUJ+EMt7BUf9GMwtdiU95VFY3A6V4 FJh1WEwzQ0m03lphtveHmBy/6moo0sw8YMRv19IS65Kn2Sf84nb0so+gkLyb0C5OKabi BZnA== X-Gm-Message-State: AOAM530QRQcYKSgbL0ESYijUgvAtxXmkGPSeUQHpLOgfPD1HhwzvIVZl UV7bVv1IaLK/a+SkNTUxKt68IvhsnMs= X-Google-Smtp-Source: ABdhPJy6M+sMGk5xXrAGCibDOGvGKKftQqO6yZ5pPCYavFlOhYQagJ8Tu8I4Xz88UQ4jwrACdTNV+Q== X-Received: by 2002:a05:6402:42cb:b0:425:d34f:e8ca with SMTP id i11-20020a05640242cb00b00425d34fe8camr2646751edc.126.1651292079121; Fri, 29 Apr 2022 21:14:39 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:38 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 17/23] builtin/receive-pack.c: Fix coding style Date: Sat, 30 Apr 2022 04:14:00 +0000 Message-Id: <20220430041406.164719-18-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/receive-pack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 9aabffa1af..ad20b41e3c 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -1664,7 +1664,7 @@ static void check_aliased_update_internal(struct command *cmd, } dst_name = strip_namespace(dst_name); - if ((item = string_list_lookup(list, dst_name)) == NULL) + if (!(item = string_list_lookup(list, dst_name))) return; cmd->skip_update = 1; @@ -2538,7 +2538,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) PACKET_READ_CHOMP_NEWLINE | PACKET_READ_DIE_ON_ERR_PACKET); - if ((commands = read_head_info(&reader, &shallow)) != NULL) { + if ((commands = read_head_info(&reader, &shallow))) { const char *unpack_status = NULL; struct string_list push_options = STRING_LIST_INIT_DUP; From patchwork Sat Apr 30 04:14:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833051 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF5B7C433EF for ; Sat, 30 Apr 2022 04:15:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382212AbiD3ESm (ORCPT ); Sat, 30 Apr 2022 00:18:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382190AbiD3EST (ORCPT ); Sat, 30 Apr 2022 00:18:19 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB889517D4 for ; Fri, 29 Apr 2022 21:14:41 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id l18so18689993ejc.7 for ; Fri, 29 Apr 2022 21:14:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=o6yT7ru7zsGXCmvUKcJvI+KABZIlTkfCaJyaKa3rzuk=; b=e98uzlzbbTOxOwEa8HCETN6KSbGIXJ02i0Je67fxyiCUk1kbR17qeQmlx95a1FVvcE bOpH3zvl+cZgB5z5L5YOKEdFKrkJh8XdxDalT6Hcpq1D5Pdupyk38EqD8dABql69A8t4 XbfwP/clg04eJy0kRZMT9k5iSBUyLsqiTPmP5aC6dM3FgfdL55pKK+m20F6FIK/xfOUg AqPm5bhsuRIIejB54o4T4pb0nnuwJzQmLZehwyrR9j8aoZaNrusy/8CWbELGYXcxBoJX a6NkxmTNSQojhg8sBqY0ag61Od12GZlcH2KF2eConkIeM+22DK+SGUV8VEt6dPBdNGb3 MrSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=o6yT7ru7zsGXCmvUKcJvI+KABZIlTkfCaJyaKa3rzuk=; b=KlHp14TINxSgxZGHCn3n/Dbd6NbsI1XzmYKkf1nrh1WJgZpEx25h4GblDxtFmsF9kR XCIw/zduwqQzcMIx3UUcEw2OzvNNo1NW+UP6nebNtWFQHPOoWmVsQyJPKukXlvmtfQlL ugSu4QGsooTjJvw+HXQ1PKf0tQb8+/iyhk/IIvQwOpfevAvxzNBeN/t2Vs3G5u2r2q6S lgdW4QmDPiI1D5DoijeMg+cWP6I5iZybv7J+SBxgyCDh7xwT0y6yVQWt0rQMw7RFIiQz PJjcp6GaRUb0vT+WCF8shdjvwb7AXnu33lsorIz9X8iSZXY/UVLvS/rnD2uPue4/9kCM zfaA== X-Gm-Message-State: AOAM5335GmjXB7RTWdIe5Wqke3MV7t1h6zFnWvDUh12j2aDm+FCy+Nl/ gAxGphMQR8lyJQ0C69Y5IEOSmdTGs30= X-Google-Smtp-Source: ABdhPJyKvoKu1MGRlyvFNKAeg2f1o+3NYBEDJaFqhFNz2mnbUzW3qItTDEPH5SkTfUAp9HdXl/jYsQ== X-Received: by 2002:a17:907:7745:b0:6f3:674a:339 with SMTP id kx5-20020a170907774500b006f3674a0339mr2300891ejc.207.1651292080084; Fri, 29 Apr 2022 21:14:40 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:39 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 18/23] builtin/replace.c: Fix coding style Date: Sat, 30 Apr 2022 04:14:01 +0000 Message-Id: <20220430041406.164719-19-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/replace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/replace.c b/builtin/replace.c index 5068f4f0b2..583702a098 100644 --- a/builtin/replace.c +++ b/builtin/replace.c @@ -72,7 +72,7 @@ static int list_replace_refs(const char *pattern, const char *format) { struct show_data data; - if (pattern == NULL) + if (!pattern) pattern = "*"; data.pattern = pattern; From patchwork Sat Apr 30 04:14:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833053 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6711CC433EF for ; Sat, 30 Apr 2022 04:15:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382216AbiD3ESr (ORCPT ); Sat, 30 Apr 2022 00:18:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382192AbiD3EST (ORCPT ); Sat, 30 Apr 2022 00:18:19 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8D4F6B089 for ; Fri, 29 Apr 2022 21:14:42 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id gh6so18805413ejb.0 for ; Fri, 29 Apr 2022 21:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qdtzDpvMAc4af8eOrDuS/mS/xnubDC+wY5LD5COs7H0=; b=Rvabm4N0+DLr7tE+329IAYRNWouKn7PT41tVsqvDDuikgvcDW99e+6eqR0yjn/ByvL JEm3xPcsNhfe0ZET36/ZU0fFLAFZ1po9YMiWzaM3/rdsiiBdkO8cSqXLl7xY0SofH9fh 7kBpxw7N2BVq2y2GdUguZc0e7bkiYcbqWKGvTuqDOsi1csOGpTR4lxAT20rnmk9SAm/j LCwlj796pkIHstvg91tyQXqXy/I3fV3yPkutySdea9Gk9zmNZz3MxsEcMlctNfdAzJ7x TEdbSWN2xwkVasaMjoe065eFt4wfBRnUSrzgCdTcWhnCu32PQRwLm7ArrSkAUQRCmNZ9 PbxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qdtzDpvMAc4af8eOrDuS/mS/xnubDC+wY5LD5COs7H0=; b=IZarFtO5HBENqt5iJqwmV7XRVte0+quq82uhz/kEjBRAOhLreOrXxzIaYKBRKuUUe8 iY7+PVAZua2iroeBecz8hcSBTEExTycxbaB2youWXszmbGVdmsrxqzVh6MxQXmUFPtot xZtDmn207P1Xj7StL3rx/bgctwlImDkzEaP8wAJIwMYat3e05QuM42p9ptcAWJIsmS+9 CvIPyK7RRpwJrsyBn+1ySxhlyCZaeYpjonn7c9O3HpQhF941CyhV89t6ZHzYA+1RYw7B lYeeAogHig3fxdMB5iY+5Ou0DFdcIu5F2AM8l6GxDCnlVrifyhJkMfH6m26fy2TZyutY 6WWw== X-Gm-Message-State: AOAM5301flKZ6/kHmLiUVptvia1XGW7DRGY4OWuN0cliu5vwpVgANdIv vcQvIET+KSZ7OQv55AARAvWnMVjyzN8= X-Google-Smtp-Source: ABdhPJwKPMt6Y2cDqru0BxDeo+jlpA0TXHpJgGkVc9lFX3Qtgbkfyav9E+6P2pRLFY9ZTqhR+kjNOA== X-Received: by 2002:a17:906:fccc:b0:6f3:7569:77fd with SMTP id qx12-20020a170906fccc00b006f3756977fdmr2331024ejb.266.1651292081101; Fri, 29 Apr 2022 21:14:41 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:40 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 19/23] builtin/rev-parse.c: Fix coding style Date: Sat, 30 Apr 2022 04:14:02 +0000 Message-Id: <20220430041406.164719-20-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/rev-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index 8480a59f57..660a6a749b 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -476,7 +476,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix) /* name(s) */ s = strpbrk(sb.buf, flag_chars); - if (s == NULL) + if (!s) s = help; if (s - sb.buf == 1) /* short option only */ From patchwork Sat Apr 30 04:14:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833052 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AE86C433F5 for ; Sat, 30 Apr 2022 04:15:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382201AbiD3ESo (ORCPT ); Sat, 30 Apr 2022 00:18:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240909AbiD3EST (ORCPT ); Sat, 30 Apr 2022 00:18:19 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 051037A98F for ; Fri, 29 Apr 2022 21:14:43 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id t5so432976edw.11 for ; Fri, 29 Apr 2022 21:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oRaeyIvLG/+8n8vzp1hUVKFLUp5qA4nbEz0eqgOp1Nk=; b=GgpAp2Sr3+4HyER/GKzVgt84hwQh5HnAIT+F/qsxUQe6154208ItTKzPT+ponAtZKc pHlcN9tBJDRX/N6uCQR5SpgJBuk98DQIF+4+1646iPDq9y1FRjyM38x/T0khYq6YbPNH t8B9qHvlHuzF5spr3aCnUzi2rV27h13qSCJBv34kDV++CQrAt+e2mEdJEQ1vPAj7LO6m WaKB0dllSWEJszi7cDT751iS97lzAPfziwwFpRR0c304mU6KFUbAWba1fUyH4bCr2QyC WwO/kxsTYaZRjga0cNgN9D309Y4ONGAboFfbUR1Q9v7YpTHWJBcKUqHjbe1g9kLyhX6g ovjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oRaeyIvLG/+8n8vzp1hUVKFLUp5qA4nbEz0eqgOp1Nk=; b=wBRoh+/Y36lRz8SWLH+QdGsXnw/GVh8VcD2zhH79NywzjFJ6tlzdHC7FOXBbTQ+9o/ SApBUQ9g/7fgfMeYQUYu1ncPKX//ih3b9hulSjB7uEMuFV2Sa+ojPRRvpsV598BgnQaN sdpp5J5tQudUlF1ZHgfd6vxZFRhNYT0NxOwY7JBlBu0Q9OfQ+V3XPImQ08Vg21WDvARz eWSZyF/7tC+B/c8/8q8GR61kRHwn2QCpoM8x8fkMvASuOvo2fTvt3xHiIlu4V++Vy8Zk 7DJhj9Qw4HJ7JHTg5leTzAxIUY87s8TUROZOa9Lu+rVLMgFNl4ypELMWzUvBc9vDLexT KnxQ== X-Gm-Message-State: AOAM5315Xy6tjzal1Z5IPSpm6d5tU+xiMauHtCTTMLA/uypCBvENyPTG TccvQ57XPUmZgmaPnywWQQ+T8EAhX2g= X-Google-Smtp-Source: ABdhPJwl7qLC6O4m1rC7aQjZRtF8Um9hJrrGUNh3ern7NH4VhLYNtfY9O9p+9dfzktJKnQu5svV9BQ== X-Received: by 2002:aa7:d416:0:b0:425:f5c7:d633 with SMTP id z22-20020aa7d416000000b00425f5c7d633mr2589608edq.105.1651292082089; Fri, 29 Apr 2022 21:14:42 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:41 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 20/23] builtin/shortlog.c: Fix coding style Date: Sat, 30 Apr 2022 04:14:03 +0000 Message-Id: <20220430041406.164719-21-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/shortlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/shortlog.c b/builtin/shortlog.c index 26c5c0cf93..62c4a4eaba 100644 --- a/builtin/shortlog.c +++ b/builtin/shortlog.c @@ -81,7 +81,7 @@ static void insert_one_record(struct shortlog *log, format_subject(&subject, oneline, " "); buffer = strbuf_detach(&subject, NULL); - if (item->util == NULL) + if (!item->util) item->util = xcalloc(1, sizeof(struct string_list)); string_list_append(item->util, buffer); } From patchwork Sat Apr 30 04:14:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833055 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F8F7C433EF for ; Sat, 30 Apr 2022 04:15:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382280AbiD3ESx (ORCPT ); Sat, 30 Apr 2022 00:18:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382200AbiD3ESU (ORCPT ); Sat, 30 Apr 2022 00:18:20 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A22526EC4C for ; Fri, 29 Apr 2022 21:14:44 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id i27so18705092ejd.9 for ; Fri, 29 Apr 2022 21:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QE/YLZL58y62duz985hH08qBW8eN5v7mL80zpClgAcA=; b=MGF4MS9HuHWocS3CLOFeKl/koXPJb0JWX88KSQGm7ldARv2s1jQ2POwjYUsFgRPcDr 94TIJA4SqXZDm1EvgPFPzm0Meigih+tfqEszqnF0mbnl7wZJGtfVfKrbTwY8vQdw860B JEbAq+JQwCQnTI+w9qTfP2WXm2hpclMQKI9Xo2ZTZRwToLOv/ZZua7PkU7eyFmSqMD/q chTsRaK8g6IC6Sgh0Jq089626HZpWVA2FmSotyNY/rIDj/B3O4H9TLUXzYO1oQlSCVEe WsBAsneIE7Y3dIWkz3GRRtpVoQEbN6GRGV5IiE2tCG4Ko+qDRT7Xbj60uR5s+eD9LNFg bPAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QE/YLZL58y62duz985hH08qBW8eN5v7mL80zpClgAcA=; b=khQn8tkKZLYcyRk1zj/OYVdSnTH3WByqZSOgoX9+GH+0Utbm8pubKjaUwJLelV80Sa PYguoUVyf6BgYnM+wBsYojjbXDqR/8xVlJk1Lgu8gKlXJ4qPklGUF54lFPQm4hFXzt91 NmsUsbTr115/V2xZujxC3U7dFoBLENmj9SeLj2sjpg9WDlU6ZGqkM0uNra5q/bApHYDJ K1FQpNQ5IaRy0ljtXmggKc38lskdy1UEXj2ZsFy9ObHo+WTym46l+iqI82bBfSFnKWGB 3fL5dTGJgL+ZO2hkrk8reVDcvdpz3KnMgeAi4uMm3gf7ibTek0HD6vff50oOV0tTSzkw 7kpA== X-Gm-Message-State: AOAM531Ykh0RgzWiCTgrs0188liAteJYMyaa3kD0nEX4xxIo51HGb+3q K7qlFGhWGGxiOKiHcNlZaU4k6Ehj5qg= X-Google-Smtp-Source: ABdhPJwOenkdHiFmc+GG/myEtbCT1fxxJDsa2Hjn8fKRr8ZsGZZxUKEaEGZxCyRSqvW8gHJhSfdFoQ== X-Received: by 2002:a17:907:3f1c:b0:6f3:98ab:4735 with SMTP id hq28-20020a1709073f1c00b006f398ab4735mr2357205ejc.547.1651292082992; Fri, 29 Apr 2022 21:14:42 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:42 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 21/23] builtin/tag.c: Fix coding style Date: Sat, 30 Apr 2022 04:14:04 +0000 Message-Id: <20220430041406.164719-22-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- builtin/tag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/tag.c b/builtin/tag.c index e5a8f85693..75dece0e4f 100644 --- a/builtin/tag.c +++ b/builtin/tag.c @@ -364,7 +364,7 @@ static void create_reflog_msg(const struct object_id *oid, struct strbuf *sb) strbuf_addstr(sb, "object of unknown type"); break; case OBJ_COMMIT: - if ((buf = read_object_file(oid, &type, &size)) != NULL) { + if ((buf = read_object_file(oid, &type, &size))) { subject_len = find_commit_subject(buf, &subject_start); strbuf_insert(sb, sb->len, subject_start, subject_len); } else { @@ -372,7 +372,7 @@ static void create_reflog_msg(const struct object_id *oid, struct strbuf *sb) } free(buf); - if ((c = lookup_commit_reference(the_repository, oid)) != NULL) + if ((c = lookup_commit_reference(the_repository, oid))) strbuf_addf(sb, ", %s", show_date(c->date, 0, DATE_MODE(SHORT))); break; case OBJ_TREE: From patchwork Sat Apr 30 04:14:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833057 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5A18C433F5 for ; Sat, 30 Apr 2022 04:15:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382290AbiD3ETD (ORCPT ); Sat, 30 Apr 2022 00:19:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382204AbiD3ESU (ORCPT ); Sat, 30 Apr 2022 00:18:20 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D3AF6EB0F for ; Fri, 29 Apr 2022 21:14:45 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id y3so18665529ejo.12 for ; Fri, 29 Apr 2022 21:14:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rZxbhKjEZ8Or6/polrg/mQ7xB1PUvAf+YLX2+y17z9c=; b=G+pd/RyZWwIgkQXUAeVvknPgP0n9xqFr5QCXu49fXM26ZTTo2ARpvgThTx++sgQQAV 35Pld3h5DSDyWWQk5ZTZiiiAQICn7xLJTssHqD5VssOC9iwA/fgCXxwA7bW6rOKji+o/ rUqfsawbYTpgL1QN4XvfwjzNQN+vDruKrG72d/YGO5V8PACm1TT2/5AjfQKixztEn4OP r1uY+vZquqUWytCZM5LjYbhapNsrXqYBkVxIQv1PzIgrrwSJeLJwOPIvyVlRWqxHMP00 iAVWmKpd9Nj17S+PV7J0cs38LbOCmManxTj8W8KtJ+4pV1JTqDsXKUrFFSc0Oal5wQA3 KGGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rZxbhKjEZ8Or6/polrg/mQ7xB1PUvAf+YLX2+y17z9c=; b=yhkEo1S8mmiA1Am9SbU//InN3Bs+4ZX8tn8ChAbDEJkUg10ev1Pg9AJ7idT5eZWNld rv8Ma6Ol8oMWLbPJvZRI5g48Sh0wJVDT+OitMKekwAkbpTEBIiuzh1P6R5txUnlzn/G8 iLdhfZ260/uxnmaWwN0aTmbQb7LD9UpQaRsV3uV04i6Fsdbltl+aDrVOGJSmplWaTxH5 F/uOskIZIS9kqdRzBmsaffFJbtG+Klu4xM3s1sItuISHsJiHinDa/yP2OB4NwANHITFs 02A8drbaLd8aulIoNEcMCgklsb/q8vUGjm8QafPzs79dvCyk8jQBoqh1JgzXK5TGC851 CAwQ== X-Gm-Message-State: AOAM530jNq8aOfs3rNgiiE25NaAf3qWGWNTBQmD/tDCLeEqs+DahEHxf JaC1YuuuRXgCAlZ3LrIwvvOv1T2KFXI= X-Google-Smtp-Source: ABdhPJyfS6YM77Ws0UWhYNBLCZlMfeyIDn45MzosKMUnNpDGpfQqHt5NxzXdfjla4cVBhrc5pUjmDQ== X-Received: by 2002:a17:907:97cd:b0:6f3:aeb8:6002 with SMTP id js13-20020a17090797cd00b006f3aeb86002mr2272072ejc.530.1651292083889; Fri, 29 Apr 2022 21:14:43 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:43 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 22/23] combine-diff.c: Fix coding style Date: Sat, 30 Apr 2022 04:14:05 +0000 Message-Id: <20220430041406.164719-23-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- combine-diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/combine-diff.c b/combine-diff.c index d93782daeb..b724f02123 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -195,10 +195,10 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase, struct lline *baseend, *newend = NULL; int i, j, origbaselen = *lenbase; - if (newline == NULL) + if (!newline) return base; - if (base == NULL) { + if (!base) { *lenbase = lennew; return newline; } From patchwork Sat Apr 30 04:14:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elia Pinto X-Patchwork-Id: 12833056 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FF2AC433EF for ; Sat, 30 Apr 2022 04:15:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349317AbiD3ETA (ORCPT ); Sat, 30 Apr 2022 00:19:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382210AbiD3ESU (ORCPT ); Sat, 30 Apr 2022 00:18:20 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CACB85673 for ; Fri, 29 Apr 2022 21:14:46 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id p4so11136420edx.0 for ; Fri, 29 Apr 2022 21:14:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JMORXA0PiM1EfpkM/8J/uEyI1VL/jP5Ia5A1V9ZHftc=; b=cVxwkJ56VkvlUNdr5NgwG3u7dJyU7iiZ5yn6VBa+nQcjX0wZzGeWfwwKUKt1AQYJlk Etsu8hFePE/auZa/xlQDYStQZNclNAqNIVolDrx+jgHTvL6+OCFZuvg8ctlRhcMM2a5P 8DYgLBNwMmQKEdxjwH0Hp2lRPPoxUD8UOY11yNgcOQNYms3T5cz0G1gciHIoEITI/yun pu9tJDXC2s/IHRvKUXMAX9zb8nn4NBqW/HrwHDq1bl3lF5KkioaEmoAZY2dNYVYYyO6x Ti8F9SxtAkoHuY/WACLoFuVZX9gWs0c9oLnsowJ3eU0IC5Ojz7Szo/PIMQxp3b+GxIYM +96w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JMORXA0PiM1EfpkM/8J/uEyI1VL/jP5Ia5A1V9ZHftc=; b=pgQRKYDpZFVkQ+Y2zl4vaz2ClkfroJwgvx09CP5GbxfwBhwZ0egCOIKxClImZQb6jA A8dkir/Lf3VnOKi1mERES5UAX/f1KjbCbGcP6XlbNRyI+3JvW85iyFYR8MGc12Ztsj9k EvJXiwC5wylup03P93PEVTq0ELq3ZOSgufA07qgH4bU28LTae1F6aW/KiQVQewmQ4g2a Lc9wxITB80PSy66/v4GlLn4zUccQ6s3RPXk1l6vlb/IZvq/eW5Jn5cbW/CWRZmHbXsDi vJt0UD9zW+/O+p9mL6bvPPENur0cmcRTphY8i21LlM44lx3t8Pd5pOSSTuJ+ojPdKl1R WXyg== X-Gm-Message-State: AOAM533Hwe2TwC0X6ixDXIhIbGEuDOnJCWbxAFc3sG40m6+ALt80RRzS 5LEw2sOmQHeSIq1MFrsG8r7x6lRO9VU= X-Google-Smtp-Source: ABdhPJycgEChH2JRcyIy2xgEuS2nzPoC08BujZWNKnk6ZbmxK32ZpI5TWQm9BurDwTvfWQ3w0Ytk2Q== X-Received: by 2002:a05:6402:1941:b0:413:2b5f:9074 with SMTP id f1-20020a056402194100b004132b5f9074mr2616247edz.414.1651292084878; Fri, 29 Apr 2022 21:14:44 -0700 (PDT) Received: from fedora35.example.com ([151.27.248.133]) by smtp.gmail.com with ESMTPSA id og47-20020a1709071def00b006f3ef214e79sm1243586ejc.223.2022.04.29.21.14.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 21:14:44 -0700 (PDT) From: Elia Pinto To: git@vger.kernel.org Cc: Elia Pinto Subject: [PATCH 23/23] commit-graph.c: Fix coding style Date: Sat, 30 Apr 2022 04:14:06 +0000 Message-Id: <20220430041406.164719-24-gitter.spiros@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220430041406.164719-1-gitter.spiros@gmail.com> References: <20220430041406.164719-1-gitter.spiros@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adhere to the git coding style which requires "Do not explicitly compute an integral value with constant 0 or '\ 0', or a pointer value with constant NULL." Signed-off-by: Elia Pinto --- commit-graph.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commit-graph.c b/commit-graph.c index 441b36016b..fcd351ee00 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -2567,7 +2567,7 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags) odb_parents = odb_commit->parents; while (graph_parents) { - if (odb_parents == NULL) { + if (!odb_parents) { graph_report(_("commit-graph parent list for commit %s is too long"), oid_to_hex(&cur_oid)); break; @@ -2590,7 +2590,7 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags) odb_parents = odb_parents->next; } - if (odb_parents != NULL) + if (odb_parents) graph_report(_("commit-graph parent list for commit %s terminates early"), oid_to_hex(&cur_oid));