diff options
author | tobhe <tobhe@cvs.openbsd.org> | 2020-06-01 21:00:52 +0000 |
---|---|---|
committer | tobhe <tobhe@cvs.openbsd.org> | 2020-06-01 21:00:52 +0000 |
commit | cb08aa882b50036feea67fc45faa94e43b743387 (patch) | |
tree | a4c86ca6665cfba2a83542d8933c89b51853bbf4 /sbin | |
parent | dec8f8ddbed36bf20395afe1a5e2d3e58f44fe42 (diff) |
Fix "comparison of integers of different signs" warning.
ok patrick@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ipsecctl/pfkdump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/ipsecctl/pfkdump.c b/sbin/ipsecctl/pfkdump.c index 12611c28828..00ddbd8bb19 100644 --- a/sbin/ipsecctl/pfkdump.c +++ b/sbin/ipsecctl/pfkdump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkdump.c,v 1.50 2020/04/23 19:57:01 tobhe Exp $ */ +/* $OpenBSD: pfkdump.c,v 1.51 2020/06/01 21:00:51 tobhe Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. @@ -267,7 +267,7 @@ print_flags(uint32_t flags) int i, comma = 0, n; len = snprintf(fstr, sizeof(fstr), "%#x<", flags); - if (len < 0 || len >= sizeof(fstr)) + if (len < 0 || (size_t)len >= sizeof(fstr)) return (NULL); for (i = 0; i < 32; i++) { if ((flags & (1 << i)) == 0 || @@ -275,7 +275,7 @@ print_flags(uint32_t flags) continue; n = snprintf(fstr + len, sizeof(fstr) - len - 1, comma ? ",%s" : "%s", entry->name); - if (n < 0 || n >= sizeof(fstr) - len - 1) + if (n < 0 || (size_t)n >= sizeof(fstr) - len - 1) return (NULL); len += n; comma = 1; |