File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -340,6 +340,9 @@ typedef uint32_t git_hashmap_iter_t;
340340 int error = name##__put_idx(&idx, &key_exists, h, key); \
341341 if (error) \
342342 return error; \
343+ GIT_ASSERT((h)->flags); \
344+ GIT_ASSERT((h)->keys); \
345+ GIT_ASSERT((h)->keys); \
343346 if (!key_exists) \
344347 (h)->keys[idx] = key; \
345348 (h)->vals[idx] = val; \
@@ -382,8 +385,11 @@ typedef uint32_t git_hashmap_iter_t;
382385 int error = name##__put_idx(&idx, &key_exists, h, key); \
383386 if (error) \
384387 return error; \
385- if (!key_exists) \
388+ GIT_ASSERT((h)->flags); \
389+ GIT_ASSERT((h)->keys); \
390+ if (!key_exists) { \
386391 (h)->keys[idx] = key; \
392+ } \
387393 return 0; \
388394 } \
389395 GIT_UNUSED_FUNCTION scope int name##_iterate(git_hashmap_iter_t *iter, key_t *key, name *h) \
You can’t perform that action at this time.
0 commit comments