Fix printing of invalid struct xfs_dqblk.d_flags

* quota.c (decode_cmd_data): Explicitly cast struct xfs_dqblk.d_flags
to uint8_t to avoid potential sign-extension bug when printing
invalid struct xfs_dqblk.d_flags.
This commit is contained in:
Дмитрий Левин 2016-05-16 22:28:31 +00:00
parent 2cad72f489
commit f77ca9ca71

View File

@ -317,7 +317,7 @@ decode_cmd_data(struct tcb *tcp, uint32_t cmd, unsigned long data)
tprintf("{version=%d, ", dq.d_version);
tprints("flags=");
printflags(xfs_dqblk_flags,
dq.d_flags, "XFS_???_QUOTA");
(uint8_t) dq.d_flags, "XFS_???_QUOTA");
tprintf(", fieldmask=%#x, ", dq.d_fieldmask);
tprintf("id=%u, ", dq.d_id);
tprintf("blk_hardlimit=%" PRIu64 ", ", dq.d_blk_hardlimit);