BUG: https://bugzilla.samba.org/show_bug.cgi?id=13930
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
talloc_free(reqid_ctx);
assert(talloc_get_size(mem_ctx) == 0);
+ ret = reqid_init(mem_ctx, INT_MAX-1, &reqid_ctx);
+ assert(ret == 0);
+
+ reqid = reqid_new(reqid_ctx, data);
+ assert(reqid == INT_MAX);
+
+ reqid = reqid_new(reqid_ctx, data);
+ assert(reqid == 0);
+
+ reqid_remove(reqid_ctx, 0);
+
+ reqid = reqid_new(reqid_ctx, data);
+ assert(reqid == 1);
+
+ talloc_free(reqid_ctx);
+
talloc_free(mem_ctx);
return 0;