@@ -344,8 +344,7 @@ static void register_node_in_indexes(cbm_gbuf_t *gb, cbm_gbuf_node_t *node) {
344344 }
345345 cbm_gbuf_node_t * * grown = realloc (gb -> by_id , (size_t )nc * sizeof (* grown ));
346346 if (grown ) {
347- memset (grown + gb -> by_id_cap , 0 ,
348- (size_t )(nc - gb -> by_id_cap ) * sizeof (* grown ));
347+ memset (grown + gb -> by_id_cap , 0 , (size_t )(nc - gb -> by_id_cap ) * sizeof (* grown ));
349348 gb -> by_id = grown ;
350349 gb -> by_id_cap = nc ;
351350 }
@@ -683,11 +682,11 @@ int64_t cbm_gbuf_upsert_node(cbm_gbuf_t *gb, const char *label, const char *name
683682 * function of the colliding entities, not of scheduling. Exactly
684683 * one entity is dropped, as one always was; kind-disambiguated
685684 * QNs (the real cure) are tracked as a follow-up. */
686- bool same_entity =
687- existing -> label && label && strcmp ( existing -> label , label ) == 0 &&
688- existing -> file_path && file_path && strcmp (existing -> file_path , file_path ) == 0 &&
689- existing -> start_line == start_line && existing -> name && name &&
690- strcmp (existing -> name , name ) == 0 ;
685+ bool same_entity = existing -> label && label && strcmp ( existing -> label , label ) == 0 &&
686+ existing -> file_path && file_path &&
687+ strcmp (existing -> file_path , file_path ) == 0 &&
688+ existing -> start_line == start_line && existing -> name && name &&
689+ strcmp (existing -> name , name ) == 0 ;
691690 if (!same_entity ) {
692691 int c = strcmp (label ? label : "" , existing -> label ? existing -> label : "" );
693692 if (c == 0 ) {
@@ -717,17 +716,15 @@ int64_t cbm_gbuf_upsert_node(cbm_gbuf_t *gb, const char *label, const char *name
717716 const char * new_label_interned = gb_intern (gb , label );
718717 bool label_changed = !existing -> label || !new_label_interned ||
719718 strcmp (existing -> label , new_label_interned ) != 0 ;
720- bool name_changed =
721- !existing -> name || !new_name || strcmp (existing -> name , new_name ) != 0 ;
719+ bool name_changed = !existing -> name || !new_name || strcmp (existing -> name , new_name ) != 0 ;
722720 if (label_changed ) {
723721 remove_node_from_ptr_array (
724722 cbm_ht_get (gb -> nodes_by_label , existing -> label ? existing -> label : "" ),
725723 existing -> id );
726724 }
727725 if (name_changed ) {
728726 remove_node_from_ptr_array (
729- cbm_ht_get (gb -> nodes_by_name , existing -> name ? existing -> name : "" ),
730- existing -> id );
727+ cbm_ht_get (gb -> nodes_by_name , existing -> name ? existing -> name : "" ), existing -> id );
731728 }
732729 existing -> label = (char * )new_label_interned ;
733730 free (existing -> name );
@@ -740,8 +737,8 @@ int64_t cbm_gbuf_upsert_node(cbm_gbuf_t *gb, const char *label, const char *name
740737 existing -> properties_json = new_props ;
741738 }
742739 if (label_changed ) {
743- node_ptr_array_t * by_label =
744- get_or_create_node_array ( gb -> nodes_by_label , existing -> label ? existing -> label : "" );
740+ node_ptr_array_t * by_label = get_or_create_node_array (
741+ gb -> nodes_by_label , existing -> label ? existing -> label : "" );
745742 cbm_da_push (by_label , (const cbm_gbuf_node_t * )existing );
746743 }
747744 if (name_changed ) {
@@ -1215,12 +1212,11 @@ static void merge_update_existing(cbm_gbuf_t *dst, cbm_gbuf_node_t *existing,
12151212 * (and every downstream consumer) run to run. Same entity → refresh;
12161213 * different entity → keep the lexicographically smallest
12171214 * (label, file_path, start_line, name). */
1218- bool same_entity =
1219- existing -> label && sn -> label && strcmp (existing -> label , sn -> label ) == 0 &&
1220- existing -> file_path && sn -> file_path &&
1221- strcmp (existing -> file_path , sn -> file_path ) == 0 &&
1222- existing -> start_line == sn -> start_line && existing -> name && sn -> name &&
1223- strcmp (existing -> name , sn -> name ) == 0 ;
1215+ bool same_entity = existing -> label && sn -> label &&
1216+ strcmp (existing -> label , sn -> label ) == 0 && existing -> file_path &&
1217+ sn -> file_path && strcmp (existing -> file_path , sn -> file_path ) == 0 &&
1218+ existing -> start_line == sn -> start_line && existing -> name && sn -> name &&
1219+ strcmp (existing -> name , sn -> name ) == 0 ;
12241220 bool sn_wins = true;
12251221 if (!same_entity ) {
12261222 int c = strcmp (sn -> label ? sn -> label : "" , existing -> label ? existing -> label : "" );
@@ -1241,10 +1237,10 @@ static void merge_update_existing(cbm_gbuf_t *dst, cbm_gbuf_node_t *existing,
12411237 * label/name changes (the old code left the node listed under its
12421238 * original label/name, so find_by_label/name mis-listed it). */
12431239 const char * new_label = gb_intern (dst , sn -> label );
1244- bool label_changed = ! existing -> label || ! new_label ||
1245- strcmp (existing -> label , new_label ) != 0 ;
1246- bool name_changed = ! existing -> name || ! sn -> name ||
1247- strcmp (existing -> name , sn -> name ) != 0 ;
1240+ bool label_changed =
1241+ ! existing -> label || ! new_label || strcmp (existing -> label , new_label ) != 0 ;
1242+ bool name_changed =
1243+ ! existing -> name || ! sn -> name || strcmp (existing -> name , sn -> name ) != 0 ;
12481244 if (label_changed ) {
12491245 remove_node_from_ptr_array (
12501246 cbm_ht_get (dst -> nodes_by_label , existing -> label ? existing -> label : "" ),
0 commit comments