The type used for casting the member was too small; for the
"%ju" format spec, we should use uintmax_t for the purpose.
This change may fix the bug reported in
https://github.com/util-linux/util-linux/issues/1511#issuecomment-
1033697617
in GitHub#1511 by Anatoly Pugachev <matorola@gmail.com>.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
xasprintf(&str, "%jd", (intmax_t)file->stat.st_size);
break;
case COL_NLINK:
- xasprintf(&str, "%ju", (unsigned long int)file->stat.st_nlink);
+ xasprintf(&str, "%ju", (uintmax_t)file->stat.st_nlink);
break;
case COL_DELETED:
xasprintf(&str, "%d", file->stat.st_nlink == 0);