diff options
author | Karel Zak | 2017-03-16 10:01:54 +0100 |
---|---|---|
committer | Karel Zak | 2017-03-16 10:01:54 +0100 |
commit | bb6762035a088583cb8c0cc87386da6f8a5958cb (patch) | |
tree | 86c8d42dee9cfecb7020f03002756cc0b2b6e2a5 /libfdisk | |
parent | tests: refresh lscpu tests (diff) | |
download | kernel-qcow2-util-linux-bb6762035a088583cb8c0cc87386da6f8a5958cb.tar.gz kernel-qcow2-util-linux-bb6762035a088583cb8c0cc87386da6f8a5958cb.tar.xz kernel-qcow2-util-linux-bb6762035a088583cb8c0cc87386da6f8a5958cb.zip |
libfdisk: fix compiler warning [-Wsign-compare]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk')
-rw-r--r-- | libfdisk/src/gpt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c index 6962e7702..c99b16f12 100644 --- a/libfdisk/src/gpt.c +++ b/libfdisk/src/gpt.c @@ -830,7 +830,7 @@ static struct gpt_entry *gpt_read_entries(struct fdisk_context *cxt, sz = (ssize_t) le32_to_cpu(header->npartition_entries) * le32_to_cpu(header->sizeof_partition_entry); - if (sz == 0 || sz >= UINT32_MAX || + if (sz == 0 || sz >= (ssize_t) UINT32_MAX || le32_to_cpu(header->sizeof_partition_entry) != sizeof(struct gpt_entry)) { DBG(LABEL, ul_debug("GPT entreis array size check failed")); return NULL; |