From: Cyril Hrubis <chrubis@suse.cz>
To: Tudor Cretu <tudor.cretu@arm.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3 2/3] safe_open, safe_openat: Fix undefined behaviour in vararg handling
Date: Wed, 30 Nov 2022 15:06:29 +0100 [thread overview]
Message-ID: <Y4djZbb+hxgmUUiN@rei> (raw)
In-Reply-To: <20221130133619.632073-3-tudor.cretu@arm.com>
Hi!
> +#ifndef __OPEN_NEEDS_MODE
> + #define __OPEN_NEEDS_MODE(oflag) \
> + (((oflag) & O_CREAT) != 0 || ((oflag) & O_TMPFILE) == O_TMPFILE)
> +#endif
I suppose that it would be a bit cleaner just to define our macro
TST_OPEN_NEEDS_MODE() instead.
Other than that it looks good.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-11-30 14:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-30 13:36 [LTP] [PATCH v3 0/3] safe_macros: Fix undefined behaviour in vararg handling Tudor Cretu
2022-11-30 13:36 ` [LTP] [PATCH v3 1/3] syscalls/f{get, set}xattr: Don't pass a pointer to mode argument in open Tudor Cretu
2022-11-30 14:15 ` Cyril Hrubis
2022-11-30 13:36 ` [LTP] [PATCH v3 2/3] safe_open, safe_openat: Fix undefined behaviour in vararg handling Tudor Cretu
2022-11-30 14:06 ` Cyril Hrubis [this message]
2022-11-30 13:36 ` [LTP] [PATCH v3 3/3] safe_semctl: " Tudor Cretu
2022-11-30 14:20 ` Cyril Hrubis
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=Y4djZbb+hxgmUUiN@rei \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=tudor.cretu@arm.com \
/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