@@ -479,10 +479,13 @@ struct escape_sequence_entry {
479479};
480480
481481static int sequence_entry_cmp (const void * hashmap_cmp_fn_data UNUSED ,
482- const struct escape_sequence_entry * e1 ,
483- const struct escape_sequence_entry * e2 ,
482+ const struct hashmap_entry * he1 ,
483+ const struct hashmap_entry * he2 ,
484484 const void * keydata )
485485{
486+ const struct escape_sequence_entry
487+ * e1 = container_of (he1 , const struct escape_sequence_entry , entry ),
488+ * e2 = container_of (he2 , const struct escape_sequence_entry , entry );
486489 return strcmp (e1 -> sequence , keydata ? keydata : e2 -> sequence );
487490}
488491
@@ -496,8 +499,7 @@ static int is_known_escape_sequence(const char *sequence)
496499 struct strbuf buf = STRBUF_INIT ;
497500 char * p , * eol ;
498501
499- hashmap_init (& sequences , (hashmap_cmp_fn )sequence_entry_cmp ,
500- NULL , 0 );
502+ hashmap_init (& sequences , sequence_entry_cmp , NULL , 0 );
501503
502504 strvec_pushl (& cp .args , "infocmp" , "-L" , "-1" , NULL );
503505 if (pipe_command (& cp , NULL , 0 , & buf , 0 , NULL , 0 ))
0 commit comments