diff options
author | Simon Horman <horms@verge.net.au> | 2010-02-02 14:42:02 +1100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2010-02-02 14:42:02 +1100 |
commit | 3d6c264eaa4be13208905867e31320ddc30471ae (patch) | |
tree | dbafb986f39f40c6df88ae4b43f33fedc20eb0b7 /kexec/arch/ppc64/crashdump-ppc64.c | |
parent | 48f3ad610b7098659064801f8dc9688e8795a42d (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.c | 5 |
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; |