aboutsummaryrefslogtreecommitdiff
path: root/src/elfclass.h
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2019-11-10 03:44:32 +0000
committerXin LI <delphij@FreeBSD.org>2019-11-10 03:44:32 +0000
commit4ef4bf0189e5e736a37f9ead9beaaa8e1cd1f9fb (patch)
tree0b82394b9b244b8f3a588afe3b96177c08ff98eb /src/elfclass.h
parentad1ba6e1e032f79d03b9a6e2c714de84d1911b3a (diff)
Notes
Diffstat (limited to 'src/elfclass.h')
-rw-r--r--src/elfclass.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/elfclass.h b/src/elfclass.h
index 5360b0b55a7e..936d8dc912e0 100644
--- a/src/elfclass.h
+++ b/src/elfclass.h
@@ -1,7 +1,7 @@
/*
* Copyright (c) Christos Zoulas 2008.
* All Rights Reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -11,7 +11,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -41,8 +41,8 @@
return toomany(ms, "program headers", phnum);
flags |= FLAGS_IS_CORE;
if (dophn_core(ms, clazz, swap, fd,
- (off_t)elf_getu(swap, elfhdr.e_phoff), phnum,
- (size_t)elf_getu16(swap, elfhdr.e_phentsize),
+ CAST(off_t, elf_getu(swap, elfhdr.e_phoff)), phnum,
+ CAST(size_t, elf_getu16(swap, elfhdr.e_phentsize)),
fsize, &flags, &notecount) == -1)
return -1;
break;
@@ -56,8 +56,8 @@
if (shnum > ms->elf_shnum_max)
return toomany(ms, "section", shnum);
if (dophn_exec(ms, clazz, swap, fd,
- (off_t)elf_getu(swap, elfhdr.e_phoff), phnum,
- (size_t)elf_getu16(swap, elfhdr.e_phentsize),
+ CAST(off_t, elf_getu(swap, elfhdr.e_phoff)), phnum,
+ CAST(size_t, elf_getu16(swap, elfhdr.e_phentsize)),
fsize, shnum, &flags, &notecount) == -1)
return -1;
/*FALLTHROUGH*/
@@ -66,10 +66,10 @@
if (shnum > ms->elf_shnum_max)
return toomany(ms, "section headers", shnum);
if (doshn(ms, clazz, swap, fd,
- (off_t)elf_getu(swap, elfhdr.e_shoff), shnum,
- (size_t)elf_getu16(swap, elfhdr.e_shentsize),
+ CAST(off_t, elf_getu(swap, elfhdr.e_shoff)), shnum,
+ CAST(size_t, elf_getu16(swap, elfhdr.e_shentsize)),
fsize, elf_getu16(swap, elfhdr.e_machine),
- (int)elf_getu16(swap, elfhdr.e_shstrndx),
+ CAST(int, elf_getu16(swap, elfhdr.e_shstrndx)),
&flags, &notecount) == -1)
return -1;
break;