From 1679c5378247f4d8bff4352c8c43020fe2c41ec4 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 7 Sep 2016 07:55:29 +0900 Subject: [PATCH] Change return type ( const char -> char ) iniparser_getsecname, iniparser_getseckeys apis return type changed "const char" to "char" for backword comppatibility issue. [Model] ALL [BinType] AP [Customer] OPEN [Issue#] N/A [Request] N/A [Occurrence Version] N/A [Problem] backword comppatibility [Cause & Measure] backword comppatibility [Checking Method] N/A [Team] Open Source Management and Setting Part [Developer] dh0128.kwak [Solution company] Samsung [Change Type] N/A Change-Id: I76d1bf40cd7f449fb1ac6dadaa304303cddbc6fb --- src/iniparser.c | 12 ++++++------ src/iniparser.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/iniparser.c b/src/iniparser.c index 1eb1004..0ddfdff 100644 --- a/src/iniparser.c +++ b/src/iniparser.c @@ -323,7 +323,7 @@ int iniparser_getsecnkeys(const dictionary * d, const char * s) a string allocated in the dictionary; do not free or modify them. */ /*--------------------------------------------------------------------------*/ -const char ** iniparser_getseckeys(const dictionary * d, const char * s, const char ** keys) +char ** iniparser_getseckeys(const dictionary * d, const char * s, const char ** keys) { int i, j, seclen ; char keym[ASCIILINESZ+1]; @@ -345,7 +345,7 @@ const char ** iniparser_getseckeys(const dictionary * d, const char * s, const c } } - return keys; + return (char**)keys; } /*-------------------------------------------------------------------------*/ @@ -363,17 +363,17 @@ const char ** iniparser_getseckeys(const dictionary * d, const char * s, const c the dictionary, do not free or modify it. */ /*--------------------------------------------------------------------------*/ -const char * iniparser_getstring(const dictionary * d, const char * key, const char * def) +char * iniparser_getstring(const dictionary * d, const char * key, const char * def) { const char * lc_key ; - const char * sval ; + char * sval ; char tmp_str[ASCIILINESZ+1]; if (d==NULL || key==NULL) - return def ; + return (char*)def ; lc_key = strlwc(key, tmp_str, sizeof(tmp_str)); - sval = dictionary_get(d, lc_key, def); + sval = (char*)dictionary_get(d, lc_key, def); return sval ; } diff --git a/src/iniparser.h b/src/iniparser.h index 0a9da72..b39424a 100644 --- a/src/iniparser.h +++ b/src/iniparser.h @@ -141,7 +141,7 @@ int iniparser_getsecnkeys(const dictionary * d, const char * s); a string allocated in the dictionary; do not free or modify them. */ /*--------------------------------------------------------------------------*/ -const char ** iniparser_getseckeys(const dictionary * d, const char * s, const char ** keys); +char ** iniparser_getseckeys(const dictionary * d, const char * s, const char ** keys); /*-------------------------------------------------------------------------*/ @@ -159,7 +159,7 @@ const char ** iniparser_getseckeys(const dictionary * d, const char * s, const c the dictionary, do not free or modify it. */ /*--------------------------------------------------------------------------*/ -const char * iniparser_getstring(const dictionary * d, const char * key, const char * def); +char * iniparser_getstring(const dictionary * d, const char * key, const char * def); /*-------------------------------------------------------------------------*/ /** -- 2.7.4