From nobody Sat May 3 15:59:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZqXXf4ZYJz5vWYP; Sat, 03 May 2025 15:59:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZqXXf3hWwz3sCR; Sat, 03 May 2025 15:59:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746287954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ApPXDRFcaMFmE/I8C9ZcQcAIgvygxlkc6RWarh4SRDw=; b=FDJ7Ce6J9y8Vi2MwIVMSRRTD2LOtEb8JBXG4s5MmhAl+68DAnNHAwShrl4MsheigdrfZED ih0mNbcWpIOER+jlWHxmQCTug8YB1DMwC3Jle5gi+UgfMVEVxEe121B33K2YpS4yTHN7w6 l+2ggesBeJcbQI9venCOq4uMCevoqDFkZPHq2aJUG9wr7fMKTxqAKyoXU/bjRul9yz3EH5 u8qQ+ORaGsemCAGhOYaHnvhFb/HnqsDW0jmeoPd897tGywVJ6FS1E/aMi1DfzzLFtMqyjZ SegCHsPyCH+NcZNycfRoHHRT2x9qMSm8JG/9coih3OtLGD5QUGvVp/+TUfXOkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746287954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ApPXDRFcaMFmE/I8C9ZcQcAIgvygxlkc6RWarh4SRDw=; b=oxHHJBaH1GNPYXxUulaCnGMUM4uOY/KE6/kRKnzt9qpZTueW+Zsbgv6uzqfSX0vg1BWLim dGvBY+tNwRHUPpRcZVGiuhkUhSroJ+Ttega6sE53qa6mEVHuczhc5Lb0kH7A++1/j0sLsc KIkx6iJbzsqTzS3ZvWHf5Pd0TsiVUApWXn8YucJjVz52rpvvHX/crNEkIp/FoMXeXfqc0E QLzlDePuWpabU3WUtVRGabg74AXCWYXF/IZTIcOP2dgpVE6972No6luCwFUIYm4YczUThH osbYwufG6/0jaJzhYgvkDpBgV50E9pHNnXoeWmtHjYn4a5XC7FnJpy1Y1qBQeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746287954; a=rsa-sha256; cv=none; b=potrvC9Pl28mpNhQI4cTEx1jEguWiuXCIlEbWZc2hTn3sqSUyax2cBPEjmowny+pmJ2VLE 9NEV/6jkgG/CYIKs+kq7XfIrjzyUF6yG2WWEAw1/z0PH8M2PCm32kkTxuMzqc5I00z9jsy mCeZwKbU8t1+POPpOxK11SDM9GZ1W52P7P2e/fOdvaGczFBp/kj+tPO0AgvFxeCF2axVEm paFXBgWY/eaDECCqaOgt+uDKDnXQhtiVXIsZcXmLWmYD7v1HNwe/Kllkz3IU9kXS5wZD9d 93uPON6XPT8cK/a9JgC3OrDP2lzM/+fCtmdXLMBb/7+0WdY7sM0yU85iCaRBOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZqXXf3DxJzpdw; Sat, 03 May 2025 15:59:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 543FxEVK021082; Sat, 3 May 2025 15:59:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 543FxEgp021079; Sat, 3 May 2025 15:59:14 GMT (envelope-from git) Date: Sat, 3 May 2025 15:59:14 GMT Message-Id: <202505031559.543FxEgp021079@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 26d4ac7a2725 - main - kyua: Don't pass NULL to unique_ptr constructors List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26d4ac7a2725c0ab2d536c402fc0185fe7afed85 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=26d4ac7a2725c0ab2d536c402fc0185fe7afed85 commit 26d4ac7a2725c0ab2d536c402fc0185fe7afed85 Author: John Baldwin AuthorDate: 2025-05-03 15:58:47 +0000 Commit: John Baldwin CommitDate: 2025-05-03 15:58:47 +0000 kyua: Don't pass NULL to unique_ptr constructors This is ambiguous when NULL is defined to an integral constant. Instead, use the more iodiomatic pattern of {} to construct a default pointer. Reviewed by: olce Differential Revision: https://reviews.freebsd.org/D50090 --- contrib/kyua/utils/process/child.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/kyua/utils/process/child.cpp b/contrib/kyua/utils/process/child.cpp index bfde8159d5c8..d554f1fd9fb5 100644 --- a/contrib/kyua/utils/process/child.cpp +++ b/contrib/kyua/utils/process/child.cpp @@ -223,7 +223,7 @@ process::child::fork_capture_aux(void) std::cerr << F("Failed to set up subprocess: %s\n") % e.what(); std::abort(); } - return std::unique_ptr< process::child >(NULL); + return {}; } else { ::close(fds[1]); LD(F("Spawned process %s: stdout and stderr inherited") % pid); @@ -284,7 +284,7 @@ process::child::fork_files_aux(const fs::path& stdout_file, std::cerr << F("Failed to set up subprocess: %s\n") % e.what(); std::abort(); } - return std::unique_ptr< process::child >(NULL); + return {}; } else { LD(F("Spawned process %s: stdout=%s, stderr=%s") % pid % stdout_file % stderr_file);