foxygit / doom Log in
commit 3cba305fc282eacac3525c382ff4745fd5e87fde
Author:     mfrancis95 <mikefrancis95@gmail.com>
AuthorDate: Sat Jun 27 16:05:47 2020 -0400
Commit:     mfrancis95 <mikefrancis95@gmail.com>
CommitDate: Sat Jun 27 16:05:47 2020 -0400

    Format M_NormalizeSlashes according to the coding style
---
 src/m_misc.c | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/m_misc.c b/src/m_misc.c
index 4ed7cae5..0ffb2478 100644
--- a/src/m_misc.c
+++ b/src/m_misc.c
@@ -678,19 +678,29 @@ void M_NormalizeSlashes(char *str)
     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