On Tue, Jan 14, 2020 at 02:42:18PM -0700, Andreas Dilger wrote: > The printf("%.*s") format requires both the buffer size and buffer > pointer to be specified for each use. Since this is repeatedly given > as "(int)sizeof(buf), (char *)buf" for mmp_nodename and mmp_bdevname > fields, with typecasts to avoid compiler warnings. > > Add a helper macro EXT2_LEN_STR() to avoid repeated boilerplate code. > > This can also be used for other superblock buffer fields that may not > have NUL-terminated strings (e.g. s_volume_name, s_last_mounted, > s_{first,last}_error_func, s_mount_opts) to simplify code and avoid > the need for temporary buffers for NUL-termination. > > Annotate the superblock string fields that may not be NUL-terminated. > > Signed-off-by: Andreas Dilger <adilger@xxxxxxxxx> Applied, thanks. - Ted