From 583b3ed6f35f11587970a332d083c8e8369ffc4c Mon Sep 17 00:00:00 2001 From: krw Date: Sun, 18 Jun 2023 18:58:55 +0000 Subject: [PATCH] Use UINT64_MAX instead of -1 to set a uint64_t value to its maximum. --- sbin/disklabel/editor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 785b1157f34..8d60c2c9b9f 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.407 2023/05/23 13:20:31 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.408 2023/06/18 18:58:55 krw Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller @@ -1979,7 +1979,7 @@ parse_sizerange(char *buf, u_int64_t *min, u_int64_t *max) return (-1); if (p != NULL && p[0] != '\0') { if (p[0] == '*') - *max = -1; + *max = UINT64_MAX; else if (parse_sizespec(p, &val2, &unit2) == -1) return (-1); -- 2.20.1