shithub: choc

Download patch

ref: 3cba305fc282eacac3525c382ff4745fd5e87fde
parent: bb9207f9fad7b1ec72860a240454a46042f29f89
author: mfrancis95 <[email protected]>
date: Sat Jun 27 12:05:47 EDT 2020

Format M_NormalizeSlashes according to the coding style

--- a/src/m_misc.c
+++ b/src/m_misc.c
@@ -678,19 +678,29 @@
     char *p;
 
     // Convert all slashes/backslashes to DIR_SEPARATOR
-    for(p = str; *p; p++)
+    for (p = str; *p; p++)
     {
-        if((*p == '/' || *p == '\\') && *p != DIR_SEPARATOR)
+        if ((*p == '/' || *p == '\\') && *p != DIR_SEPARATOR)
+        {
             *p = DIR_SEPARATOR;
+        }
     }
 
     // Remove trailing slashes
-    while(p > str && *--p == DIR_SEPARATOR)
+    while (p > str && *--p == DIR_SEPARATOR)
+    {
         *p = 0;
+    }
 
     // Collapse multiple slashes
-    for(p = str; (*str++ = *p); )
-        if(*p++ == DIR_SEPARATOR)
-            while(*p == DIR_SEPARATOR)
+    for (p = str; (*str++ = *p); )
+    {
+        if (*p++ == DIR_SEPARATOR)
+        {
+            while (*p == DIR_SEPARATOR)
+            {
                 p++;
+            }
+        }
+    }
 }
\ No newline at end of file