From b5a6d365e48051263a6b99500b54b55dba404415 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 27 Nov 2014 12:00:41 +0100 Subject: [PATCH] object: fix returning UINT_MAX for uint32_t in nl_object_diff() Signed-off-by: Thomas Haller --- lib/object.c | 4 ++-- 1 file 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)); }