On Mon, Nov 04, 2019 at 06:05:53PM -0800, Darrick J. Wong wrote: > > It is not specified in ISO C, but clearly specified in the GNU C > > extensions and used all over the kernel. > > Just out of curiosity, do you know if clang supports that extension? Yes. Basically any modern C compiler does. > > I don't really understand that sentence. What would do you instead? > > if (xfs_sb_version_hascrc(&mp->m_sb)) { > struct xfs_dir3_free *from3 = (struct xfs_dir3_free *)from; > > ... > to->nused = be32_to_cpu(from3->hdr.nused); > to->bests = &from3->bests[0]; > } > > Since we're already passing around pointers to the xfs_dir[23]_free > structure, we might as well use it instead of open-coding the arithmetic. > Sorry that wasn't clear. :/ Sure, that is much better and I'll switch to it.