summaryrefslogtreecommitdiff
path: root/usr/src/lib/fm
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2020-04-06 23:48:28 +0300
committerToomas Soome <tsoome@me.com>2020-04-19 22:39:22 +0300
commit745679391d7a234b12343aa2407c382709f6d4bd (patch)
treeec1a46fec701c99d89eea9b5884ae4e1713c92f3 /usr/src/lib/fm
parentb531f6d16eb39863e7bbc34773fb7ef7a282a0a2 (diff)
downloadillumos-joyent-745679391d7a234b12343aa2407c382709f6d4bd.tar.gz
12524 fm: unsigned is never less than zero
Reviewed by: Robert Mustacchi <rm@fingolfin.org> Reviewed by: C Fraire <cfraire@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/lib/fm')
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/chip/chip_sun4v.c2
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_sun4v.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/usr/src/lib/fm/topo/modules/sun4v/chip/chip_sun4v.c b/usr/src/lib/fm/topo/modules/sun4v/chip/chip_sun4v.c
index ffcd6071ef..1860094bbe 100644
--- a/usr/src/lib/fm/topo/modules/sun4v/chip/chip_sun4v.c
+++ b/usr/src/lib/fm/topo/modules/sun4v/chip/chip_sun4v.c
@@ -353,7 +353,7 @@ chip_create(topo_mod_t *mod, tnode_t *rnode, const char *name,
md_proc_t *procp;
topo_mod_dprintf(mod, "enumerating cmp chip\n");
- if (min < 0 || max < 0 || min > max) {
+ if (min > max) {
topo_mod_dprintf(mod, "Invalid chip range(%d,%d)\n", min, max);
return (-1);
}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_sun4v.c b/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_sun4v.c
index 9e1d48d5f6..fe8afd14c8 100644
--- a/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_sun4v.c
+++ b/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_sun4v.c
@@ -291,7 +291,7 @@ platform_hb_enum(topo_mod_t *mod, tnode_t *parent, const char *name,
int nrcs, nrcnode = 0;
busorrc_t *rcs;
- if (imin < 0 || imax < 0 || imin > imax) {
+ if (imin > imax) {
topo_mod_dprintf(mod, "Invalid hb range(%d,%d)\n", imin, imax);
return (-1);
}