@@ -269,7 +269,6 @@ static bool xdl_clean_mmatch(uint8_t const *action, long i, long s, long e) {
269269 */
270270static int xdl_cleanup_records (xdlclassifier_t * cf , xdfile_t * xdf1 , xdfile_t * xdf2 ) {
271271 long i , nm , mlim ;
272- xrecord_t * recs ;
273272 xdlclass_t * rcrec ;
274273 uint8_t * action1 = NULL , * action2 = NULL ;
275274 bool need_min = !!(cf -> flags & XDF_NEED_MINIMAL );
@@ -293,16 +292,18 @@ static int xdl_cleanup_records(xdlclassifier_t *cf, xdfile_t *xdf1, xdfile_t *xd
293292 */
294293 if ((mlim = xdl_bogosqrt ((long )xdf1 -> nrec )) > XDL_MAX_EQLIMIT )
295294 mlim = XDL_MAX_EQLIMIT ;
296- for (i = xdf1 -> dstart , recs = & xdf1 -> recs [xdf1 -> dstart ]; i <= xdf1 -> dend ; i ++ , recs ++ ) {
297- rcrec = cf -> rcrecs [recs -> minimal_perfect_hash ];
295+ for (i = xdf1 -> dstart ; i <= xdf1 -> dend ; i ++ ) {
296+ size_t mph1 = xdf1 -> recs [i ].minimal_perfect_hash ;
297+ rcrec = cf -> rcrecs [mph1 ];
298298 nm = rcrec ? rcrec -> len2 : 0 ;
299299 action1 [i ] = (nm == 0 ) ? DISCARD : (nm >= mlim && !need_min ) ? INVESTIGATE : KEEP ;
300300 }
301301
302302 if ((mlim = xdl_bogosqrt ((long )xdf2 -> nrec )) > XDL_MAX_EQLIMIT )
303303 mlim = XDL_MAX_EQLIMIT ;
304- for (i = xdf2 -> dstart , recs = & xdf2 -> recs [xdf2 -> dstart ]; i <= xdf2 -> dend ; i ++ , recs ++ ) {
305- rcrec = cf -> rcrecs [recs -> minimal_perfect_hash ];
304+ for (i = xdf2 -> dstart ; i <= xdf2 -> dend ; i ++ ) {
305+ size_t mph2 = xdf2 -> recs [i ].minimal_perfect_hash ;
306+ rcrec = cf -> rcrecs [mph2 ];
306307 nm = rcrec ? rcrec -> len1 : 0 ;
307308 action2 [i ] = (nm == 0 ) ? DISCARD : (nm >= mlim && !need_min ) ? INVESTIGATE : KEEP ;
308309 }
@@ -312,8 +313,7 @@ static int xdl_cleanup_records(xdlclassifier_t *cf, xdfile_t *xdf1, xdfile_t *xd
312313 * false, or become true.
313314 */
314315 xdf1 -> nreff = 0 ;
315- for (i = xdf1 -> dstart , recs = & xdf1 -> recs [xdf1 -> dstart ];
316- i <= xdf1 -> dend ; i ++ , recs ++ ) {
316+ for (i = xdf1 -> dstart ; i <= xdf1 -> dend ; i ++ ) {
317317 if (action1 [i ] == KEEP ||
318318 (action1 [i ] == INVESTIGATE && !xdl_clean_mmatch (action1 , i , xdf1 -> dstart , xdf1 -> dend ))) {
319319 xdf1 -> reference_index [xdf1 -> nreff ++ ] = i ;
@@ -324,8 +324,7 @@ static int xdl_cleanup_records(xdlclassifier_t *cf, xdfile_t *xdf1, xdfile_t *xd
324324 }
325325
326326 xdf2 -> nreff = 0 ;
327- for (i = xdf2 -> dstart , recs = & xdf2 -> recs [xdf2 -> dstart ];
328- i <= xdf2 -> dend ; i ++ , recs ++ ) {
327+ for (i = xdf2 -> dstart ; i <= xdf2 -> dend ; i ++ ) {
329328 if (action2 [i ] == KEEP ||
330329 (action2 [i ] == INVESTIGATE && !xdl_clean_mmatch (action2 , i , xdf2 -> dstart , xdf2 -> dend ))) {
331330 xdf2 -> reference_index [xdf2 -> nreff ++ ] = i ;
0 commit comments