[oe] [meta-oe][PATCH v2] systemd: Replace use of %m in printf formats
Phil Blundell
philb at gnu.org
Mon Jul 4 09:39:59 UTC 2011
On Sat, 2011-07-02 at 17:47 -0700, Khem Raj wrote:
> +- if ((fd = mkostemp(temp, O_CLOEXEC|O_CREAT|O_WRONLY)) < 0) {
> ++ if ((fd = mkstemp(temp)) < 0) {
This change looks like it will effectively remove O_CLOEXEC without
reinstating it anywhere else. Have you verified this is a safe thing to
do?
> +- fd = mkostemp(path, O_RDWR|O_CLOEXEC);
> ++ fd = mkstemp(path);
Likewise.
> ++ char dev[20];
> + int prio = 0, k;
> +
> + if ((k = fscanf(m->proc_swaps,
> +- "%ms " /* device/file */
> ++ "%19s " /* device/file */
> + "%*s " /* type of swap */
Is 19 characters definitely enough? If this is potentially a pathname
then it could be much longer than that.
p.
More information about the Openembedded-devel
mailing list