On Mon, Sep 5, 2022 at 2:12 PM Ammar Faizi wrote: > fd = open(fname, O_WRONLY); > if (fd < 0) { > perror("open"); > - goto err; > + ret = 1; > + goto out; > } > for (i = 0; i < NR_BUFS; i++) { > memset(buf, i + 1, BUF_SIZE); > ret = write(fd, buf, BUF_SIZE); > if (ret != BUF_SIZE) { > fprintf(stderr, "bad file prep write\n"); > - goto err; > + ret = 1; > + close(fd); > + goto out; > } > } should use T_EXIT_* for ret? -- Viro