From 336ed010227d14209870f45ac15f0d8788e5e80f Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Tue, 27 Feb 2018 21:55:46 +0100 Subject: [PATCH] Make parameters const They won't be altered by the function anyway, and in order to be able to pass std::strings (from C++ code), the functions need to accept const char arrays. --- src/getsection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/getsection.h b/src/getsection.h index e6ecc13..c449611 100644 --- a/src/getsection.h +++ b/src/getsection.h @@ -4,8 +4,8 @@ /* Return the offset, and the length of an ELF section with a given name in a given ELF file */ int get_elf_section_offset_and_length(const char* fname, const char* section_name, unsigned long *offset, unsigned long *length); -void print_hex(char* fname, unsigned long offset, unsigned long length); +void print_hex(const char* fname, unsigned long offset, unsigned long length); -void print_binary(char* fname, unsigned long offset, unsigned long length); +void print_binary(const char* fname, unsigned long offset, unsigned long length); #endif /* GETSECTION_H */ -- 2.11.4.GIT