File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ static inline void init_remotes_hash(void)
135135
136136static struct remote * make_remote (const char * name , int len )
137137{
138- struct remote * ret , * replaced ;
138+ struct remote * ret ;
139139 struct remotes_hash_key lookup ;
140140 struct hashmap_entry lookup_entry , * e ;
141141
@@ -162,8 +162,8 @@ static struct remote *make_remote(const char *name, int len)
162162 remotes [remotes_nr ++ ] = ret ;
163163
164164 hashmap_entry_init (& ret -> ent , lookup_entry .hash );
165- replaced = hashmap_put_entry (& remotes_hash , ret , ent );
166- assert ( replaced == NULL ); /* no previous entry overwritten */
165+ if ( hashmap_put_entry (& remotes_hash , ret , ent ))
166+ BUG ( "hashmap_put overwrote entry after hashmap_get returned NULL" );
167167 return ret ;
168168}
169169
You can’t perform that action at this time.
0 commit comments