Move initialization closer to use

Should make it a bit more readable, the variable is used before that
case as well but doesn't require the zero initialization in that case.
This commit is contained in:
Baruch Even 2014-08-06 07:24:59 +03:00
parent 0071546cd2
commit a46581a35e

View file

@ -12,7 +12,7 @@ int capn_deflate(struct capn_stream* s) {
} }
while (s->avail_in) { while (s->avail_in) {
int i, sz = 0; int i, sz;
uint8_t hdr = 0; uint8_t hdr = 0;
uint8_t *p; uint8_t *p;
@ -33,6 +33,7 @@ int capn_deflate(struct capn_stream* s) {
if (s->avail_in < 8) if (s->avail_in < 8)
return CAPN_NEED_MORE; return CAPN_NEED_MORE;
sz = 0;
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
if (s->next_in[i]) { if (s->next_in[i]) {
sz ++; sz ++;