Source-Changes-HG archive

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

[src/trunk]: src/common/lib/libprop Fix incorrect type (found by lint), and a...



details:   https://anonhg.NetBSD.org/src/rev/1be6ef6ad560
branches:  trunk
changeset: 934617:1be6ef6ad560
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jun 14 21:28:58 2020 +0000

description:
Fix incorrect type (found by lint), and add linted comments for the
long long -> long (uintmax_t on LP64)

diffstat:

 common/lib/libprop/prop_array_util.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 894c41f79fab -r 1be6ef6ad560 common/lib/libprop/prop_array_util.c
--- a/common/lib/libprop/prop_array_util.c      Sun Jun 14 18:24:21 2020 +0000
+++ b/common/lib/libprop/prop_array_util.c      Sun Jun 14 21:28:58 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: prop_array_util.c,v 1.6 2020/06/06 21:25:59 thorpej Exp $      */
+/*     $NetBSD: prop_array_util.c,v 1.7 2020/06/14 21:28:58 christos Exp $     */
 
 /*-
  * Copyright (c) 2006, 2020 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
 }
 
 static bool
-prop_array_add_unsigned_number(prop_array_t array, intmax_t val)
+prop_array_add_unsigned_number(prop_array_t array, uintmax_t val)
 {
        return prop_array_add_and_rel(array, prop_number_create_unsigned(val));
 }
@@ -136,6 +136,7 @@
                         unsigned int indx,                             \
                         typ val)                                       \
 {                                                                      \
+       /*LINTED: for conversion from long long to 'long'*/             \
        return prop_array_set_ ## which ## _number(array, indx, val);   \
 }                                                                      \
                                                                        \
@@ -143,6 +144,7 @@
 prop_array_add_ ## name (prop_array_t array,                           \
                         typ val)                                       \
 {                                                                      \
+       /*LINTED: for conversion from long long to 'long'*/             \
        return prop_array_add_ ## which ## _number(array, val);         \
 }
 



Home | Main Index | Thread Index | Old Index