fs/jfs: Inconsistent signed/unsigned types usage in return values
authorLidong Chen <lidong.chen@oracle.com>
Mon, 16 Dec 2024 20:22:40 +0000 (20:22 +0000)
committerFelix Zielcke <fzielcke@z-51.de>
Wed, 11 Jun 2025 15:42:34 +0000 (17:42 +0200)
commit078b6b3aeade3826a0e53f0ae1362d6c9c7cbbd5
tree7e6aba574472be99a9b2557e322d7c30dedbc4c5
parent96595815333e1a23c4725cacc78dab31f6aee9ee
fs/jfs: Inconsistent signed/unsigned types usage in return values

The getblk() returns a value of type grub_int64_t which is assigned to
iagblk and inoblk, both of type grub_uint64_t, in grub_jfs_read_inode()
via grub_jfs_blkno(). This patch fixes the type mismatch in the
functions. Additionally, the getblk() will return 0 instead of -1 on
failure cases. This change is safe because grub_errno is always set in
getblk() to indicate errors and it is later checked in the callers.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name fs-jfs-Inconsistent-signed-unsigned-types-usage-in-return.patch
grub-core/fs/jfs.c