Code readability (Was: [PATCH] More smb_filename cleanups.)

Andreas Schneider asn at
Fri Mar 11 06:59:05 UTC 2016

On Thursday 10 March 2016 19:15:52 Jeremy Allison wrote:
> Here is a short, easy to review patchset
> that removes one lp_posix_pathname, fixes
> on VFS module that got missed in the get_nt_acl_fn
> changes, and finally fixes up some of the functions that
> call into utility functions that call
> lp_posix_pathnames() to take a const
> struct smb_filename * instead of a
> const char *.

General question, not really patchset related.

Seeing this:

+		    !(fsp->posix_flags & FSP_POSIX_FLAGS_PATHNAMES) &&

would it makes sense for code readability to add a macro in a prominent place:

#define isflagset(flagfield, flag) (((flagfield) & (flag)) == (flag))

then use:

!isflagset(fsp->posix_flags, FSP_POSIX_FLAGS_PATHNAMES)

	-- andreas

Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at

More information about the samba-technical mailing list