dj(1): return top-of-scope variable

This commit is contained in:
Emma Tebibyte 2024-07-14 02:43:01 -06:00
parent fe0c631d42
commit fd1ed79329
Signed by: emma
GPG Key ID: 06FA419A1698C270

View File

@ -282,13 +282,14 @@ int main(int argc, char *argv[]) {
{ /* read */ { /* read */
long skipping; long skipping;
size_t t;
/* hack to intentionally get a partial read from Io_read */ /* hack to intentionally get a partial read from Io_read */
if ((skipping = MIN(io[0].seek, io[0].bs)) > 0) { if ((skipping = MIN(io[0].seek, io[0].bs)) > 0) {
io[0].bufuse = io[0].bs - (size_t)skipping; io[0].bufuse = io[0].bs - (size_t)skipping;
} }
size_t t = io[0].bufuse; t = io[0].bufuse;
if (Io_read(&io[0])->bufuse == t && !noerror && io[0].error == 0) { if (Io_read(&io[0])->bufuse == t && !noerror && io[0].error == 0) {
Io_read(&io[0]); /* second chance */ Io_read(&io[0]); /* second chance */
} }