Date: Thu, 29 Jan 2026 15:39:51 +0000 From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 7982c36da11c - stable/14 - kyua: Don't pass NULL to unique_ptr constructors Message-ID: <697b7f47.38e50.60ba5a15@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7982c36da11c94ac8ece46b23fadcf607d0e8396 commit 7982c36da11c94ac8ece46b23fadcf607d0e8396 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2025-05-03 15:58:47 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2026-01-29 15:17:28 +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 (cherry picked from commit 26d4ac7a2725c0ab2d536c402fc0185fe7afed85) --- 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);home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?697b7f47.38e50.60ba5a15>
