From: job Date: Fri, 1 Mar 2024 09:36:55 +0000 (+0000) Subject: Lipstick on a pig: avoid comparing signed and unsigned X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e70758520e3b94cc3632c465ec64b5e226441cd1;p=openbsd Lipstick on a pig: avoid comparing signed and unsigned OK tb@ claudio@ --- diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c index 8426c222bc1..f962d8174f8 100644 --- a/usr.sbin/rpki-client/main.c +++ b/usr.sbin/rpki-client/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.253 2024/03/01 08:10:09 tb Exp $ */ +/* $OpenBSD: main.c,v 1.254 2024/03/01 09:36:55 job Exp $ */ /* * Copyright (c) 2021 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -897,9 +897,9 @@ load_shortlist(const char *fqdn) static void check_fs_size(int fd, const char *cachedir) { - struct statvfs fs; - const long long minsize = 500 * 1024 * 1024; - const long long minnode = 300 * 1000; + struct statvfs fs; + unsigned long long minsize = 500 * 1024 * 1024; + unsigned long long minnode = 300 * 1000; if (fstatvfs(fd, &fs) == -1) err(1, "statfs %s", cachedir); @@ -909,13 +909,13 @@ check_fs_size(int fd, const char *cachedir) fprintf(stderr, "WARNING: rpki-client may need more than " "the available disk space\n" "on the file-system holding %s.\n", cachedir); - fprintf(stderr, "available space: %lldkB, " - "suggested minimum %lldkB\n", - (long long)fs.f_bavail * fs.f_frsize / 1024, + fprintf(stderr, "available space: %llukB, " + "suggested minimum %llukB\n", + (unsigned long long)fs.f_bavail * fs.f_frsize / 1024, minsize / 1024); - fprintf(stderr, "available inodes %lld, " - "suggested minimum %lld\n\n", - (long long)fs.f_favail, minnode); + fprintf(stderr, "available inodes: %llu, " + "suggested minimum: %llu\n\n", + (unsigned long long)fs.f_favail, minnode); fflush(stderr); } }