git: ad4f3bdf733c - main - cat: Missed a couple.

From: Dag-Erling Smørgrav <des_at_FreeBSD.org>
Date: Fri, 10 May 2024 11:06:18 UTC
The branch main has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=ad4f3bdf733c1a670021f4db378338f5aaedbfd8

commit ad4f3bdf733c1a670021f4db378338f5aaedbfd8
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2024-05-10 11:04:56 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2024-05-10 11:05:45 +0000

    cat: Missed a couple.
    
    MFC after:      3 days
    Sponsored by:   Klara, Inc.
---
 bin/cat/cat.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/cat/cat.c b/bin/cat/cat.c
index 5db2781e9912..3e7974e5f334 100644
--- a/bin/cat/cat.c
+++ b/bin/cat/cat.c
@@ -125,7 +125,7 @@ init_casper_net(cap_channel_t *casper)
 	familylimit = AF_LOCAL;
 	cap_net_limit_name2addr_family(limit, &familylimit, 1);
 
-	if (cap_net_limit(limit) < 0)
+	if (cap_net_limit(limit) != 0)
 		err(EXIT_FAILURE, "unable to apply limits");
 }
 #endif
@@ -206,7 +206,7 @@ main(int argc, char *argv[])
 
 	caph_cache_catpages();
 
-	if (caph_enter_casper() < 0)
+	if (caph_enter_casper() != 0)
 		err(EXIT_FAILURE, "capsicum");
 
 	if (bflag || eflag || nflag || sflag || tflag || vflag)
@@ -471,7 +471,7 @@ udom_open(const char *path, int flags)
 			errno = serrno;
 			return (-1);
 		}
-		if (caph_rights_limit(fd, &rights) < 0) {
+		if (caph_rights_limit(fd, &rights) != 0) {
 			serrno = errno;
 			close(fd);
 			freeaddrinfo(res0);