What about a union? ///jon > -----Original Message----- > From: Eric Dumazet <[email protected]> > Sent: Friday, 29 June, 2018 09:58 > To: Mohan Krishna Ghanta Krishnamurthy > <[email protected]>; tipc- > [email protected]; Jon Maloy <[email protected]>; > [email protected]; [email protected]; > [email protected]; [email protected] > Cc: Parthasarathy Bhuvaragan <[email protected]> > Subject: Re: [net-next 2/3] tipc: implement socket diagnostics for AF_TIPC > > > > On 03/21/2018 06:37 AM, GhantaKrishnamurthy MohanKrishna wrote: > > This commit adds socket diagnostics capability for AF_TIPC in netlink > > family NETLINK_SOCK_DIAG in a new kernel module (diag.ko). > > ... > > +static u64 __tipc_diag_gen_cookie(struct sock *sk) > > +{ > > + u32 res[2]; > > + > > + sock_diag_save_cookie(sk, res); > > + return *((u64 *)res); > > +} > > I am pretty sure some combination of compiler / arch could be not happy > with this assumption that res[] is aligned to allow an u64 to be read like > that. >
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ tipc-discussion mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tipc-discussion
