Remove unnecessary {}s.

This commit is contained in:
Nigel Tao committed 2017-08-26 17:30:04 +10:00
1 parent 018d8d1893
commit b328529e00
2 files changed
+5 -15

No files matched your search

+2 -10
View File
@@ -97,20 +97,12 @@ func (g *gen) writeFuncImpl(b *buffer, n *a.Func) error {
} }
b.writes("{\n") b.writes("{\n")
b.writex(k.bHeader) b.writex(k.bHeader)
if k.suspendible { if k.suspendible && k.coroSuspPoint > 0 {
if k.coroSuspPoint > 0 {
b.writex(k.bBodyResume) b.writex(k.bBodyResume)
} else {
b.writes("{\n")
}
} }
b.writex(k.bBody) b.writex(k.bBody)
if k.suspendible { if k.suspendible && k.coroSuspPoint > 0 {
if k.coroSuspPoint > 0 {
b.writex(k.bBodySuspend) b.writex(k.bBodySuspend)
} else {
b.writes("}\n")
}
} }
b.writex(k.bFooter) b.writex(k.bFooter)
b.writes("}\n\n") b.writes("}\n\n")
+3 -5
View File
@@ -1504,7 +1504,6 @@ puffs_flate_status puffs_flate_decoder_init_huff(puffs_flate_decoder* self,
uint32_t v_high_bits; uint32_t v_high_bits;
uint32_t v_delta; uint32_t v_delta;
{
memset(v_counts, 0, sizeof(v_counts)); memset(v_counts, 0, sizeof(v_counts));
v_i = a_n_codes0; v_i = a_n_codes0;
while (v_i < a_n_codes1) { while (v_i < a_n_codes1) {
@@ -1590,7 +1589,7 @@ puffs_flate_status puffs_flate_decoder_init_huff(puffs_flate_decoder* self,
} }
v_min_cl += 1; v_min_cl += 1;
} }
label_0_break:; label_0_break:;
v_max_cl = 15; v_max_cl = 15;
while (true) { while (true) {
if (v_counts[v_max_cl] != 0) { if (v_counts[v_max_cl] != 0) {
@@ -1602,7 +1601,7 @@ puffs_flate_status puffs_flate_decoder_init_huff(puffs_flate_decoder* self,
} }
v_max_cl -= 1; v_max_cl -= 1;
} }
label_1_break:; label_1_break:;
if (v_max_cl <= 9) { if (v_max_cl <= 9) {
self->private_impl.f_n_huffs_bits[a_which] = v_max_cl; self->private_impl.f_n_huffs_bits[a_which] = v_max_cl;
} else { } else {
@@ -1746,8 +1745,7 @@ puffs_flate_status puffs_flate_decoder_init_huff(puffs_flate_decoder* self,
goto exit; goto exit;
} }
} }
label_3_break:; label_3_break:;
}
exit: exit:
return status; return status;
} }