diff options
| author | Michael Biebl <biebl@debian.org> | 2020-05-08 21:41:46 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-05-08 21:41:46 +0200 |
| commit | 14a437f08bfacbdbe3ed3d4e36dcf8a199df8e9e (patch) | |
| tree | 036108c3f080f94e794f52be66cc2bab2158486e /src/platform/nmp-object.c | |
| parent | 9df39b936fcb2f3d27ff7e653e645c16900807e3 (diff) | |
| parent | d460892bbfece74fb6d3cd846bf6ef548290be41 (diff) | |
Update upstream source from tag 'upstream/1.24.0'
Update to upstream version '1.24.0' with Debian dir 36f1778d11d8b638b63bd623816627ac76cb75ee
Diffstat (limited to 'src/platform/nmp-object.c')
| -rw-r--r-- | src/platform/nmp-object.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c index 541211cd..a6aa5e22 100644 --- a/src/platform/nmp-object.c +++ b/src/platform/nmp-object.c @@ -1405,15 +1405,15 @@ nmp_object_id_cmp (const NMPObject *obj1, const NMPObject *obj2) nm_assert (klass2); NM_CMP_DIRECT (klass->obj_type, klass2->obj_type); /* resort to pointer comparison */ - if (klass < klass2) - return -1; - return 1; + NM_CMP_DIRECT_PTR (klass, klass2); + return 0; } if (!klass->cmd_plobj_id_cmp) { /* the klass doesn't implement ID cmp(). That means, different objects * never compare equal, but the cmp() according to their pointer value. */ - return (obj1 < obj2) ? -1 : 1; + NM_CMP_DIRECT_PTR (obj1, obj2); + return 0; } return klass->cmd_plobj_id_cmp (&obj1->object, &obj2->object); |