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)
135
135
136
136
static struct remote * make_remote (const char * name , int len )
137
137
{
138
- struct remote * ret , * replaced ;
138
+ struct remote * ret ;
139
139
struct remotes_hash_key lookup ;
140
140
struct hashmap_entry lookup_entry , * e ;
141
141
@@ -162,8 +162,8 @@ static struct remote *make_remote(const char *name, int len)
162
162
remotes [remotes_nr ++ ] = ret ;
163
163
164
164
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" );
167
167
return ret ;
168
168
}
169
169
You can’t perform that action at this time.
0 commit comments