Change return type ( const char -> char ) 78/87178/1 accepted/tizen/ivi/20160926.000642 accepted/tizen/mobile/20160926.000550 accepted/tizen/tv/20160926.000606 accepted/tizen/wearable/20160926.000624 submit/tizen/20160907.011502 submit/tizen/20160923.052548
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 6 Sep 2016 22:55:29 +0000 (07:55 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 6 Sep 2016 22:55:29 +0000 (07:55 +0900)
 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
src/iniparser.h

index 1eb1004..0ddfdff 100644 (file)
@@ -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 ;
 }
 
index 0a9da72..b39424a 100644 (file)
@@ -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);
 
 /*-------------------------------------------------------------------------*/
 /**