This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=b7dc60447121858bd3ed5da1183a28d906a849e4

commit b7dc60447121858bd3ed5da1183a28d906a849e4 (HEAD -> main)
Author: Guillem Jover <[email protected]>
AuthorDate: Wed Jul 10 23:03:42 2024 +0200

    dselect: Use enum values instead of literal integers
    
    Makes the code more clear on what it is comparing against.
    
    Changelog: internal
---
 dselect/pkgtop.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dselect/pkgtop.cc b/dselect/pkgtop.cc
index e7bedc7f2..b904fb569 100644
--- a/dselect/pkgtop.cc
+++ b/dselect/pkgtop.cc
@@ -59,13 +59,15 @@ int packagelist::describemany(char buf[], const char 
*prioritystring,
   ssoabbrev= _("All");
   switch (statsortorder) {
   case sso_avail:
-    if (pps->ssavail == -1) break;
+    if (pps->ssavail == ssa_none)
+      break;
     ssostring= ssastrings[pps->ssavail];
     ssoabbrev= ssaabbrevs[pps->ssavail];
     statindent++;
     break;
   case sso_state:
-    if (pps->ssstate == -1) break;
+    if (pps->ssstate == sss_none)
+      break;
     ssostring= sssstrings[pps->ssstate];
     ssoabbrev= sssabbrevs[pps->ssstate];
     statindent++;

-- 
Dpkg.Org's dpkg

Reply via email to