Commit bd077966 authored by Helge Deller's avatar Helge Deller Committed by Simon Horman
Browse files

kexec-tools: Fix conversion overflow when compiling on 32-bit platforms



When compiling kexec-tools on a 32-bit platform, assigning an
(unsigned long long) value to an (unsigned long) variable creates
this warning:

elf_info.c: In function 'read_phys_offset_elf_kcore':
elf_info.c:805:14: warning: conversion from 'long long unsigned int' to
     'long unsigned int' changes value from '18446744073709551615' to '4294967295'
  805 |  *phys_off = UINT64_MAX;

Fix it by using ULONG_MAX instead of UINT64_MAX.

Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
parent 775f258f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment