Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libprop Fix pasto; use {,U}LLONG{MIN,MAX} correctl...



details:   https://anonhg.NetBSD.org/src/rev/7255abb4c5c2
branches:  trunk
changeset: 973220:7255abb4c5c2
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Jun 24 14:28:10 2020 +0000

description:
Fix pasto; use {,U}LLONG{MIN,MAX} correctly in the {u,}llong{min,max}
range checks.

PR lib/55414

diffstat:

 tests/lib/libprop/t_proplib.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (39 lines):

diff -r 6973a67087e2 -r 7255abb4c5c2 tests/lib/libprop/t_proplib.c
--- a/tests/lib/libprop/t_proplib.c     Wed Jun 24 12:43:40 2020 +0000
+++ b/tests/lib/libprop/t_proplib.c     Wed Jun 24 14:28:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_proplib.c,v 1.3 2020/06/08 21:31:17 thorpej Exp $ */
+/* $NetBSD: t_proplib.c,v 1.4 2020/06/24 14:28:10 thorpej Exp $ */
 
 /*
  * Copyright (c) 2008, 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include <sys/cdefs.h>
 __COPYRIGHT("@(#) Copyright (c) 2008, 2020\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_proplib.c,v 1.3 2020/06/08 21:31:17 thorpej Exp $");
+__RCSID("$NetBSD: t_proplib.c,v 1.4 2020/06/24 14:28:10 thorpej Exp $");
 
 #include <limits.h>
 #include <stdlib.h>
@@ -551,16 +551,16 @@
 #endif
 
        ATF_REQUIRE(prop_number_longlong_value(n_llong_max, &val.v_llong) &&
-                   val.v_llong == INTPTR_MAX);
+                   val.v_llong == LLONG_MAX);
        ATF_REQUIRE(prop_number_longlong_value(n_llong_min, &val.v_llong) &&
-                   val.v_llong == INTPTR_MIN);
+                   val.v_llong == LLONG_MIN);
        ATF_REQUIRE(!prop_number_longlong_value(n_ullong_max, &val.v_llong));
 
        ATF_REQUIRE(prop_number_ulonglong_value(n_llong_max, &val.v_ullong) &&
-                   val.v_ullong == INTPTR_MAX);
+                   val.v_ullong == LLONG_MAX);
        ATF_REQUIRE(!prop_number_ulonglong_value(n_llong_min, &val.v_ullong));
        ATF_REQUIRE(prop_number_ulonglong_value(n_ullong_max, &val.v_ullong) &&
-                   val.v_ullong == UINTPTR_MAX);
+                   val.v_ullong == ULLONG_MAX);
 
        /* int8_t / uint8_t */
        ATF_REQUIRE(prop_number_int8_value(n_int8_max, &val.v_int8) &&



Home | Main Index | Thread Index | Old Index