]> git.jsancho.org Git - lugaru.git/blobdiff - Source/MacCompatibility.cpp
Fixed lots of errors spotted by cppcheck
[lugaru.git] / Source / MacCompatibility.cpp
index 272288a639b09da4b3fd4551d9db6f5e2a8b66be..7d049058f71297a7de57fe463bffbedae3ff4465 100644 (file)
@@ -215,10 +215,8 @@ static inline const char *getPrefPath(void)
 static int locateCorrectCase(char *buf, bool makedirs)
 {
     int rc;
-    char *ptr;
-    char *prevptr;
+    char *ptr = buf;
 
-    ptr = prevptr = buf;
     while (ptr = strchr(ptr + 1, '/')) {
         *ptr = '\0';  /* block this path section off */
         rc = locateOneElement(buf);