summaryrefslogtreecommitdiffhomepage
path: root/src/logic
diff options
context:
space:
mode:
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/pe_get_image_meta.c10
-rw-r--r--src/logic/pe_map_raw_image.c8
2 files changed, 11 insertions, 7 deletions
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c
index 540ac87..ea76a92 100644
--- a/src/logic/pe_get_image_meta.c
+++ b/src/logic/pe_get_image_meta.c
@@ -6,7 +6,7 @@
#include <perk/perk.h>
#include "perk_impl.h"
-static int pe_free_image_meta_impl (struct pe_image_meta * meta, int status)
+static int pe_free_image_meta_impl(struct pe_image_meta * meta, int status)
{
unsigned i;
@@ -20,12 +20,12 @@ static int pe_free_image_meta_impl (struct pe_image_meta * meta, int status)
}
}
-void pe_free_image_meta (struct pe_image_meta * meta)
+void pe_free_image_meta(struct pe_image_meta * meta)
{
pe_free_image_meta_impl(meta,0);
}
-int pe_get_named_section_index (const struct pe_image_meta * m, const char * name)
+int pe_get_named_section_index(const struct pe_image_meta * m, const char * name)
{
int i; for (i=0; i<m->coff.num_of_sections; i++)
if (!(strcmp(name,m->sectbl[i].name)))
@@ -34,7 +34,7 @@ int pe_get_named_section_index (const struct pe_image_meta * m, const char * nam
return -1;
}
-int pe_get_block_section_index (const struct pe_image_meta * m, const struct pe_block * block)
+int pe_get_block_section_index(const struct pe_image_meta * m, const struct pe_block * block)
{
int i;
uint32_t low,high;
@@ -50,7 +50,7 @@ int pe_get_block_section_index (const struct pe_image_meta * m, const struct pe_
return -1;
}
-int pe_get_image_meta (const struct pe_raw_image * image, struct pe_image_meta ** meta)
+int pe_get_image_meta(const struct pe_raw_image * image, struct pe_image_meta ** meta)
{
int i,j,s,status;
struct pe_image_meta * m;
diff --git a/src/logic/pe_map_raw_image.c b/src/logic/pe_map_raw_image.c
index 58f914b..d93e605 100644
--- a/src/logic/pe_map_raw_image.c
+++ b/src/logic/pe_map_raw_image.c
@@ -8,7 +8,11 @@
#include <perk/perk.h>
-int pe_map_raw_image (int fd, const char * path, int prot, struct pe_raw_image * map)
+int pe_map_raw_image(
+ int fd,
+ const char * path,
+ int prot,
+ struct pe_raw_image * map)
{
struct stat stat;
bool fnew;
@@ -35,7 +39,7 @@ int pe_map_raw_image (int fd, const char * path, int prot, struct pe_raw_image *
return (map->addr == MAP_FAILED) ? -1 : 0;
}
-int pe_unmap_raw_image (struct pe_raw_image * map)
+int pe_unmap_raw_image(struct pe_raw_image * map)
{
return munmap(map->addr,map->size);
}