diff --git a/common.c b/common.c index 0d94ab859fc866c7716c428b01d2809fb9f032f5..c9a825ed0ae6014e18e1120de57f67854b530d3e 100644 --- a/common.c +++ b/common.c @@ -155,7 +155,7 @@ fail: int pin_status(struct blob_buf *bb, char *ip_addr) { struct json_object *response, *rv_json; - char *rv; + const char *rv; int pin_status; response = mobile_get_pin_status_zte(ip_addr); diff --git a/libmobile_zte.c b/libmobile_zte.c index 9840f356703b160ef0a341daaf94f76b7281d7d5..7c7e938c252c341b9655cc6e0de54feb5946bbb1 100644 --- a/libmobile_zte.c +++ b/libmobile_zte.c @@ -14,7 +14,7 @@ static void curl_cleaner(CURLcode *curl); static size_t write_func(void *buffer, size_t size, size_t nmemb, void *data); static int apn_profile_idx(struct json_object *apn_profiles, char *name); static int get_apn_profiles_len(char *ip_addr); -static char *lexer(char **input, char *delimiter); +static char *lexer(const char **input, char *delimiter); static char *get_query_wrapper(char *ip_addr, char *vars); static CURLcode perform_post_request(char *ip_addr, CURL *curl, char *query, struct string *str); static CURLcode perform_get_request(char *ip_addr, CURL *curl, char *query, struct string *str); @@ -159,7 +159,7 @@ fail: * Will alter the input string and allocate memory for the return value! * The caller is responsible for freeing the return value. */ -static char *lexer(char **input, char *delimiter) +static char *lexer(const char **input, char *delimiter) { char *token, *substr; @@ -351,7 +351,7 @@ static struct json_object *parse_apn_profiles(struct json_object *apn_profiles) char *field_names[13] = {"profile_name", "apn_name", "mode", "wan_dial", "ppp_auth_mode", "ppp_username", "ppp_passwd", "pdp", "pdpd_select", "pdp_addr", "dns_mode", "prefer_dns_manual", "standby_dns_manual"}; json_object_object_foreach(apn_profiles, key, val) { - char *apn_string = json_object_get_string(val); + const char *apn_string = json_object_get_string(val); int i = 0; struct json_object *apn_profile = json_object_new_object(); char *field_val;