[PATCH 10/11] lib: fwts_memorymap: constify function arguments where appropriate

Colin King colin.king at canonical.com
Tue Oct 16 19:20:47 UTC 2012


From: Colin Ian King <colin.king at canonical.com>

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/lib/include/fwts_memorymap.h |    2 +-
 src/lib/src/fwts_memorymap.c     |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/include/fwts_memorymap.h b/src/lib/include/fwts_memorymap.h
index b125ec0..ae94f85 100644
--- a/src/lib/include/fwts_memorymap.h
+++ b/src/lib/include/fwts_memorymap.h
@@ -42,7 +42,7 @@ int        fwts_memory_map_is_reserved(fwts_list *memory_map_list, const uint64_
 fwts_list *fwts_memory_map_table_load(fwts_framework *fw);
 void       fwts_memory_map_table_free(fwts_list *memory_map_list);
 void       fwts_memory_map_table_dump(fwts_framework *fw, fwts_list *memory_map_list);
-const char *fwts_memory_map_name(int type);
+const char *fwts_memory_map_name(const int type);
 fwts_memory_map_entry *fwts_memory_map_info(fwts_list *memory_map_list, const uint64_t memory);
 
 #endif
diff --git a/src/lib/src/fwts_memorymap.c b/src/lib/src/fwts_memorymap.c
index 46fe455..fe5dd7b 100644
--- a/src/lib/src/fwts_memorymap.c
+++ b/src/lib/src/fwts_memorymap.c
@@ -77,7 +77,7 @@ static int fwts_memory_map_str_to_type(const char *str)
  *  fwts_memory_map_type_to_str()
  *	convert E280 type values to strings
  */
-static char *fwts_memory_map_type_to_str(int type)
+static char *fwts_memory_map_type_to_str(const int type)
 {
 	switch (type) {
 	case FWTS_MEMORY_MAP_RESERVED:
@@ -320,7 +320,7 @@ void fwts_memory_map_table_free(fwts_list *memory_map_list)
 	fwts_list_free(memory_map_list, free);
 }
 
-const char *fwts_memory_map_name(int type)
+const char *fwts_memory_map_name(const int type)
 {
 	switch (type) {
 	case FWTS_FIRMWARE_BIOS:
-- 
1.7.10.4




More information about the fwts-devel mailing list