diff options
author | Thomas Haller <thaller@redhat.com> | 2014-11-27 11:00:41 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-11-27 11:00:41 (GMT) |
commit | b5a6d365e48051263a6b99500b54b55dba404415 (patch) | |
tree | 59a5c3bf23cd2eb683175fcfdcbf95aa0c6fac3d /lib/object.c | |
parent | cb75576df0468f74b25204e94a6fb897b99dab30 (diff) | |
download | libnl-b5a6d365e48051263a6b99500b54b55dba404415.zip libnl-b5a6d365e48051263a6b99500b54b55dba404415.tar.gz libnl-b5a6d365e48051263a6b99500b54b55dba404415.tar.bz2 |
object: fix returning UINT_MAX for uint32_t in nl_object_diff()
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/object.c')
-rw-r--r-- | lib/object.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/object.c b/lib/object.c index 52bc873..cad24e0 100644 --- a/lib/object.c +++ b/lib/object.c @@ -363,7 +363,7 @@ uint32_t nl_object_diff(struct nl_object *a, struct nl_object *b) struct nl_object_ops *ops = obj_ops(a); if (ops != obj_ops(b) || ops->oo_compare == NULL) - return UINT_MAX; + return UINT32_MAX; return ops->oo_compare(a, b, ~0, 0); } @@ -383,7 +383,7 @@ int nl_object_match_filter(struct nl_object *obj, struct nl_object *filter) if (ops != obj_ops(filter) || ops->oo_compare == NULL) return 0; - + return !(ops->oo_compare(obj, filter, filter->ce_mask, LOOSE_COMPARISON)); } |