]> git.sesse.net Git - vlc/commitdiff
Symbian: kill warnings, remove unecessary includes and style on path.cpp
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 10 Jan 2011 22:48:49 +0000 (23:48 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 10 Jan 2011 22:49:13 +0000 (23:49 +0100)
src/symbian/path.cpp

index 650be892b3cc3f05e1725f4127c4e0f5eefdf361..40261a965e19ca195dba7e62a66f151483d0562f 100755 (executable)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#include <f32file.h>
-#include <e32base.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <string.h>
-#include <utf.h>
+#include <f32file.h>    /* RFs */
+#include <string.h>     /* strlen */
+#include <utf.h>        /* CnvUtfConverter */
 
 #include "path.h"
 
@@ -62,33 +57,28 @@ extern "C" char * GetConstPrivatePath(void)
     size_t len;
     char carray[KMaxFileName];
 
-    if(GetPrivatePath(privatePath)!=KErrNone)
+    if (GetPrivatePath(privatePath) != KErrNone)
     {
-        goto defaultreturn;
+        return strdup("C:\\Data\\Others");
     }
 
     CnvUtfConverter::ConvertFromUnicodeToUtf8( privatepathutf8, privatePath );
 
     TInt index = 0;
-    for(index =0 ; index < privatepathutf8.Length(); index++)
+    for (index = 0; index < privatepathutf8.Length(); index++)
     {
         carray[index] = privatepathutf8[index];
     }
     carray[index] = 0;
 
-    if((len = strnlen((const char *)carray, KMaxFileName) < KMaxFileName)
+    if ((len = strnlen((const char *)carray, KMaxFileName) < KMaxFileName))
     {
-        carray[len-1]='\0';
+        carray[len-1] = '\0';
+        return strdup((const char *)carray);
     }
     else
     {
-        goto defaultreturn;
+        return strdup("C:\\Data\\Others");
     }
-
-
-    return strdup((const char *)carray);
-
-defaultreturn:
-    return strdup("C:\\Data\\Others");
 }