From 6891092cda0f90f555d88f594fda7dba65370c7c Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Tue, 17 Dec 2024 20:58:30 -0600 Subject: [PATCH] Rework distro_series further --- cpp/lintian-ppa.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cpp/lintian-ppa.cpp b/cpp/lintian-ppa.cpp index 9b57ca5..325d2af 100644 --- a/cpp/lintian-ppa.cpp +++ b/cpp/lintian-ppa.cpp @@ -395,9 +395,11 @@ int main(int argc, char* argv[]) { auto ubuntu_opt = lp->distributions["ubuntu"]; distribution ubuntu = ubuntu_opt.value(); auto ds_opt = ubuntu.current_series; - auto current_series; - if (ds_opt) - current_series = ds_opt; + if (!ds_opt) { + std::cerr << "Failed to get current_series.\n"; + return 1; + } + auto current_series = ds_opt; // Retrieve user and PPA auto user_opt = lp->people[args.user];