adc->validPos = base;
- if ( !code ) do {
+ if (code) {
+ goto done;
+ }
+
+ do {
if (avc->f.states & CForeign) {
code = (*ops->more)(rock, &length, &moredata);
if ( code )
- break;
+ goto done;
}
#ifndef AFS_NOSTATS
bytesToXfer += length;
ICL_TYPE_POINTER, avc, ICL_TYPE_INT32, code,
ICL_TYPE_INT32, length);
code = -34;
- break;
+ goto done;
}
code = (*ops->write)(rock, fP, offset, bytesread, &byteswritten);
if ( code )
- break;
+ goto done;
offset += bytesread;
base += bytesread;
length -= bytesread;
}
code = 0;
} while (moredata);
+ done:
if (!code)
code = (*ops->close)(rock, avc, adc, tsmall);
if (ops)