From: Thomas Haller Date: Thu, 27 Nov 2014 11:00:41 +0000 (+0100) Subject: object: fix returning UINT_MAX for uint32_t in nl_object_diff() X-Git-Tag: libnl3_2_26rc1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5a6d365e48051263a6b99500b54b55dba404415;p=thirdparty%2Flibnl.git object: fix returning UINT_MAX for uint32_t in nl_object_diff() Signed-off-by: Thomas Haller --- 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)); }