diff options
Diffstat (limited to 'gps/utils/loc_cfg.cpp')
-rw-r--r-- | gps/utils/loc_cfg.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gps/utils/loc_cfg.cpp b/gps/utils/loc_cfg.cpp index 5c33320..967d2f3 100644 --- a/gps/utils/loc_cfg.cpp +++ b/gps/utils/loc_cfg.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -56,12 +56,12 @@ static uint32_t DEBUG_LEVEL = 0xff; static uint32_t TIMESTAMP = 0; /* Parameter spec table */ -static loc_param_s_type loc_param_table[] = +static const loc_param_s_type loc_param_table[] = { {"DEBUG_LEVEL", &DEBUG_LEVEL, NULL, 'n'}, {"TIMESTAMP", &TIMESTAMP, NULL, 'n'}, }; -int loc_param_num = sizeof(loc_param_table) / sizeof(loc_param_s_type); +static const int loc_param_num = sizeof(loc_param_table) / sizeof(loc_param_s_type); typedef struct loc_param_v_type { @@ -92,7 +92,7 @@ RETURN VALUE SIDE EFFECTS N/A ===========================================================================*/ -int loc_set_config_entry(loc_param_s_type* config_entry, loc_param_v_type* config_value) +int loc_set_config_entry(const loc_param_s_type* config_entry, loc_param_v_type* config_value) { int ret=-1; if(NULL == config_entry || NULL == config_value) @@ -181,7 +181,7 @@ SIDE EFFECTS N/A ===========================================================================*/ int loc_fill_conf_item(char* input_buf, - loc_param_s_type* config_table, uint32_t table_length) + const loc_param_s_type* config_table, uint32_t table_length) { int ret = 0; @@ -258,7 +258,7 @@ RETURN VALUE SIDE EFFECTS N/A ===========================================================================*/ -int loc_read_conf_r(FILE *conf_fp, loc_param_s_type* config_table, uint32_t table_length) +int loc_read_conf_r(FILE *conf_fp, const loc_param_s_type* config_table, uint32_t table_length) { int ret=0; @@ -322,7 +322,7 @@ SIDE EFFECTS N/A ===========================================================================*/ int loc_update_conf(const char* conf_data, int32_t length, - loc_param_s_type* config_table, uint32_t table_length) + const loc_param_s_type* config_table, uint32_t table_length) { int ret = -1; @@ -377,7 +377,7 @@ RETURN VALUE SIDE EFFECTS N/A ===========================================================================*/ -void loc_read_conf(const char* conf_file_name, loc_param_s_type* config_table, +void loc_read_conf(const char* conf_file_name, const loc_param_s_type* config_table, uint32_t table_length) { FILE *conf_fp = NULL; |