decoded->data = bytes_read;
while (1) {
- offset += decode_varint(&decoded->area, decoded->area + decoded->data - offset, &sz);
- if (offset == -1)
+ int ret;
+
+ ret = decode_varint(&decoded->area, decoded->area + decoded->data - offset, &sz);
+ if (ret == -1)
goto fail_rewrite;
+ offset += ret;
if (!sz) {
- offset += decode_varint(&decoded->area, decoded->area + decoded->data - offset, &sz);
- if (offset == -1)
+ ret = decode_varint(&decoded->area, decoded->area + decoded->data - offset, &sz);
+ if (ret == -1)
goto fail_rewrite;
+ offset += ret;
if (!sz)
goto leave;
else
offset += sz;
decoded->area += sz;
- offset += decode_varint(&decoded->area, decoded->area + decoded->data - offset, &sz);
- if (offset == -1)
+ ret = decode_varint(&decoded->area, decoded->area + decoded->data - offset, &sz);
+ if (ret == -1)
goto fail_rewrite;
+ offset += ret;
v = ist2(decoded->area, sz);
offset += sz;
decoded->data = bytes_read;
while (1) {
- offset += decode_varint(&decoded->area, decoded->area + decoded->data - offset, &sz);
- if (offset == -1)
+ int ret;
+
+ ret = decode_varint(&decoded->area, decoded->area + decoded->data - offset, &sz);
+ if (ret == -1)
goto fail_rewrite;
+ offset += ret;
if (!sz) {
- offset += decode_varint(&decoded->area, decoded->area + decoded->data - offset, &sz);
- if (offset == -1)
+ ret = decode_varint(&decoded->area, decoded->area + decoded->data - offset, &sz);
+ if (ret == -1)
goto fail_rewrite;
+ offset += ret;
if (!sz)
goto leave;
else