From ad4f3bdf733c1a670021f4db378338f5aaedbfd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Fri, 10 May 2024 13:04:56 +0200 Subject: [PATCH] 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 5db2781e991..3e7974e5f33 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);