lib: Use server_id_cmp() in server_id_equal()
[samba.git] / lib / util / server_id.c
index ca998116bf40bc0da55da17e4921bb280a18068f..e66c9791007a97bef1726c80770b39658d1da341 100644 (file)
@@ -49,19 +49,8 @@ int server_id_cmp(const struct server_id *p1, const struct server_id *p2)
 
 bool server_id_equal(const struct server_id *p1, const struct server_id *p2)
 {
-       if (!server_id_same_process(p1, p2)) {
-               return false;
-       }
-
-       if (p1->task_id != p2->task_id) {
-               return false;
-       }
-
-       if (p1->unique_id != p2->unique_id) {
-               return false;
-       }
-
-       return true;
+       int cmp = server_id_cmp(p1, p2);
+       return (cmp == 0);
 }
 
 char *server_id_str_buf(struct server_id id, struct server_id_buf *dst)