From patchwork Mon Feb 7 18:33:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 540631 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 8BD4AC43217 for ; Mon, 7 Feb 2022 18:37:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233896AbiBGSgw (ORCPT ); Mon, 7 Feb 2022 13:36:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240853AbiBGSdO (ORCPT ); Mon, 7 Feb 2022 13:33:14 -0500 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 12778C0401D9 for ; Mon, 7 Feb 2022 10:33:14 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id cn6so9361420edb.5 for ; Mon, 07 Feb 2022 10:33:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ssHaNiY3LReYl3MVuJ+ePd9JHdf9OG1Dd7zZJ3nge2k=; b=Y04HjLPsZkYdoFCeBvut+f8CXidNVJOGkPxikLhixK501IvyPyXIzekoWjSlmrF8OX u03ERTnhW8DE58bhyNSXTsd2whnjJBZ4aIpR0gDNddM7XqB+9jop/3FmKpHHKtBg7Lc+ Cf23LyG18ool9UQz6QmgP8iyLNerW26JbfoaI= 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=ssHaNiY3LReYl3MVuJ+ePd9JHdf9OG1Dd7zZJ3nge2k=; b=Y4rAOdiGROBcs7Mpiv+hhUx+8t2CE6oqItXYCeBgO34zVBt8vAUKHSTHk+V/AsGb35 7V69OWbgmqvJk/4TN3z+CDJY0P6wKEBGvejLqxUTTbP/aQXd5cq2ceazqM44rgau0WGm qO/QqVl7+eMBvZGwrhA6AaF1bKFPAb0KeDW+N+laSzBBT+6EH1KhOPcYrnwkpKBOXWk4 4w2w/8KYvKbkXDdLS6OM+Mf9t7GKjm8Jy8ZQmI2f3a5/Lh8HhMGy9gIeq4YH+81GnuAq gvesAiSwmbsIgKtS2/Z7Nvx3ag9yRldj5Jp+M6ejX1pN15PWihof/YYAlfN0ZVAePzgT 5Vhg== X-Gm-Message-State: AOAM532U+HAL16NTGl87LjLDlvQDvWdOjOloFyfmDbtSlLKbgj7fU7LA 3TTfhIXe0e6RWZgAjbFKQdo1Xw== X-Google-Smtp-Source: ABdhPJwGN4VbnI4x7rDYfog/zY+635S5wcdgEYYlW6+Pp2dJwVNzXbvi5aUiiztSLaMEBlh2B8XjcQ== X-Received: by 2002:aa7:c043:: with SMTP id k3mr790601edo.184.1644258792671; Mon, 07 Feb 2022 10:33:12 -0800 (PST) Received: from alco.lan (80.71.134.83.ipv4.parknet.dk. [80.71.134.83]) by smtp.gmail.com with ESMTPSA id k15sm3045173eji.64.2022.02.07.10.33.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 10:33:12 -0800 (PST) From: Ricardo Ribalda To: kunit-dev@googlegroups.com, kasan-dev@googlegroups.com, linux-kselftest@vger.kernel.org, Brendan Higgins , Mika Westerberg Cc: Ricardo Ribalda Subject: [PATCH 3/6] kunit: use NULL macros Date: Mon, 7 Feb 2022 19:33:05 +0100 Message-Id: <20220207183308.1829495-3-ribalda@chromium.org> X-Mailer: git-send-email 2.35.0.263.gb82422642f-goog In-Reply-To: <20220207183308.1829495-1-ribalda@chromium.org> References: <20220207183308.1829495-1-ribalda@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Replace the NULL checks with the more specific and idiomatic NULL macros. Signed-off-by: Ricardo Ribalda --- lib/kunit/kunit-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kunit/kunit-test.c b/lib/kunit/kunit-test.c index 555601d17f79..8e2fe083a549 100644 --- a/lib/kunit/kunit-test.c +++ b/lib/kunit/kunit-test.c @@ -435,7 +435,7 @@ static void kunit_log_test(struct kunit *test) KUNIT_EXPECT_NOT_ERR_OR_NULL(test, strstr(suite.log, "along with this.")); #else - KUNIT_EXPECT_PTR_EQ(test, test->log, (char *)NULL); + KUNIT_EXPECT_NULL(test, test->log); #endif }