public inbox for [email protected]
 help / color / mirror / Atom feed
From: Alviro Iskandar Setiawan <[email protected]>
To: Ammar Faizi <[email protected]>
Cc: Jens Axboe <[email protected]>,
	Pavel Begunkov <[email protected]>,
	 io-uring Mailing List <[email protected]>,
	"GNU/Weeb Mailing List" <[email protected]>,
	 Kanna Scarlet <[email protected]>,
	Muhammad Rizki <[email protected]>
Subject: Re: [PATCH liburing v1] test/ringbuf-read: Delete `.ringbuf-read.%d` before exit
Date: Mon, 5 Sep 2022 15:42:54 +0700	[thread overview]
Message-ID: <CAOG64qOUeGV1ZY8-Lu01+X=a-sGkxgag7tx3g+pQ_gF8=BGjKQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>

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

  reply	other threads:[~2022-09-05  8:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05  7:12 [PATCH liburing v1] test/ringbuf-read: Delete `.ringbuf-read.%d` before exit Ammar Faizi
2022-09-05  8:42 ` Alviro Iskandar Setiawan [this message]
2022-09-05  8:45   ` Ammar Faizi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOG64qOUeGV1ZY8-Lu01+X=a-sGkxgag7tx3g+pQ_gF8=BGjKQ@mail.gmail.com' \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox