lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 13 Jun 2007 10:48:50 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Eric Dumazet <dada1@...mosbay.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/18] splice: abstract out actor data

On Wed, Jun 13 2007, Peter Zijlstra wrote:
> On Tue, 2007-06-12 at 18:22 +0200, Jens Axboe wrote:
> > On Tue, Jun 12 2007, Eric Dumazet wrote:
> > > On Tue, 12 Jun 2007 08:57:57 +0200
> > > Jens Axboe <jens.axboe@...cle.com> wrote:
> > > 
> > > 
> > > > +	struct splice_desc sd = {
> > > > +		.total_len = len,
> > > > +		.flags = flags,
> > > > +		.pos = *ppos,
> > > > +	};
> > > > +
> > > > +	sd.file = out;
> > > 
> > > minor remark, why sd.file is setup differently than other fields ?
> > > 
> > > (this several times on this patch)
> > 
> > yeah, it's inside an anonymous union, and apparently gcc doesn't like it
> > being initialized that way.
> 
> The one time I had such a situation something along the lines of:
> 
> struct splice_desc sd = {
> 	.total_len = len,
> 	.flags = flags,
> 	.pos = *ppos,
> 	{ .file = out },
> };
> 
> worked.

OK, that looks pretty handy. But I just threw the towel into the ring
and named the union instead yesterday. The outside initialization of
file/userptr/data was an eyesore to me.

-- 
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ