summaryrefslogtreecommitdiff
path: root/kexec/arch/ppc64/crashdump-ppc64.c
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2010-02-02 14:42:02 +1100
committerSimon Horman <horms@verge.net.au>2010-02-02 14:42:02 +1100
commit3d6c264eaa4be13208905867e31320ddc30471ae (patch)
treedbafb986f39f40c6df88ae4b43f33fedc20eb0b7 /kexec/arch/ppc64/crashdump-ppc64.c
parent48f3ad610b7098659064801f8dc9688e8795a42d (diff)
Avoid possible overflows from signed/unsigned comparisons
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/ppc64/crashdump-ppc64.c')
-rw-r--r--kexec/arch/ppc64/crashdump-ppc64.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c
index 412db8f..0176bc7 100644
--- a/kexec/arch/ppc64/crashdump-ppc64.c
+++ b/kexec/arch/ppc64/crashdump-ppc64.c
@@ -126,7 +126,8 @@ static int get_dyn_reconf_crash_memory_ranges(void)
uint64_t start, end;
char fname[128], buf[32];
FILE *file;
- int i, n;
+ unsigned int i;
+ int n;
uint32_t flags;
strcpy(fname, "/proc/device-tree/");
@@ -450,7 +451,7 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
void add_usable_mem_rgns(unsigned long long base, unsigned long long size)
{
- int i;
+ unsigned int i;
unsigned long long end = base + size;
unsigned long long ustart, uend;