commit 069f84d5cf33b800b44c6c2507c1730df9ea5446 from: Stefan Sperling date: Mon Jun 11 01:31:01 2018 UTC use signed int for max numer of object idset elements commit - 736b910fe5b9621fef211a1db3e1bbff02626f10 commit + 069f84d5cf33b800b44c6c2507c1730df9ea5446 blob - ce9c8329ed958373dff3c02191c71ba63dee27ef blob + 68c9c90e1ee5d379791a817a91cc2d2fd6307579 --- lib/got_lib_object_idset.h +++ lib/got_lib_object_idset.h @@ -28,4 +28,4 @@ int got_object_idset_contains(struct got_object_idset struct got_object_id *); void got_object_idset_for_each(struct got_object_idset *, void (*cb)(struct got_object_id *, void *, void *), void *); -unsigned int got_object_idset_num_elements(struct got_object_idset *); +int got_object_idset_num_elements(struct got_object_idset *); blob - 2fa47dfcb44d0cc960edab73d4d1d50baaa5f7a1 blob + e7e8b1b918ce38fbbb00abcd2583937dcfabf32b --- lib/object_idset.c +++ lib/object_idset.c @@ -48,8 +48,8 @@ struct got_object_idset { * which of these lists an object ID is stored in. */ TAILQ_HEAD(, got_object_idset_element) entries[0xff + 1]; - unsigned int nelem; -#define GOT_OBJECT_IDSET_MAX_ELEM UINT_MAX + int nelem; +#define GOT_OBJECT_IDSET_MAX_ELEM INT_MAX }; struct got_object_idset * @@ -207,7 +207,7 @@ void got_object_idset_for_each(struct got_object_idset } } -unsigned int +int got_object_idset_num_elements(struct got_object_idset *set) { return set->nelem;