Commit 064156a442bf22dd9e037cf71d30d01ee1fbd188

Authored by animetosho
1 parent 69c186ab

Replace some cases with gf_multby_zero for consistency's sake

Showing 1 changed file with 2 additions and 10 deletions   Show diff stats
src/gf_w8.c
... ... @@ -1244,11 +1244,7 @@ gf_w8_composite_multiply_region_alt(gf_t *gf, void *src, void *dest, gf_val_32_t
1244 1244 gf_region_data rd;
1245 1245 int sub_reg_size;
1246 1246  
1247   - if (val == 0) {
1248   - if (xor) return;
1249   - memset(dest, 0, bytes);
1250   - return;
1251   - }
  1247 + if (val == 0) { gf_multby_zero(dest, bytes, xor); return; }
1252 1248  
1253 1249 gf_set_region_data(&rd, gf, src, dest, bytes, val, xor, 32);
1254 1250 gf_do_initial_region_alignment(&rd);
... ... @@ -1385,11 +1381,7 @@ gf_w8_composite_multiply_region(gf_t *gf, void *src, void *dest, gf_val_32_t val
1385 1381  
1386 1382 cd = (struct gf_w8_composite_data *) h->private;
1387 1383  
1388   - if (val == 0) {
1389   - if (xor) return;
1390   - memset(dest, 0, bytes);
1391   - return;
1392   - }
  1384 + if (val == 0) { gf_multby_zero(dest, bytes, xor); return; }
1393 1385  
1394 1386 gf_set_region_data(&rd, gf, src, dest, bytes, val, xor, 1);
1395 1387 gf_do_initial_region_alignment(&rd);
... ...