- config-lexer.c:ccomment(): cleaned up style issues
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Thu, 4 Jun 2015 11:00:54 +0000 (11:00 +0000)
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Thu, 4 Jun 2015 11:00:54 +0000 (11:00 +0000)
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@6042 82007160-df01-0410-b94d-b575c5fd34c7

src/config-lexer.l

index b333e6019ca41ed3fd248c3975286ad9ff1e6e15..2dbb210171170440a091ed8c8ba1ddc6e5ae5522 100644 (file)
@@ -253,33 +253,39 @@ OFF                      {
 
 
 /* C-comment ignoring routine -kre*/
-void ccomment(void)
+void
+ccomment(void)
 {
-  int c;
+  int c = 0;
 
   /* log(L_NOTICE, "got comment"); */
   while (1)
   {
-     while ((c = input()) != '*' && c != EOF)
-        if (c == '\n') ++linenum;
-     if (c == '*')
-     {
-        while ((c = input()) == '*');
-        if (c == '/') break;
-        else if (c == '\n')
-          ++linenum;
-     }
+    while ((c = input()) != '*' && c != EOF)
+      if (c == '\n')
+        ++linenum;
+
+    if (c == '*')
+    {
+      while ((c = input()) == '*')
+        /* Nothing */ ;
+      if (c == '/')
+        break;
+      else if (c == '\n')
+        ++linenum;
+    }
+
     if (c == EOF)
     {
-       YY_FATAL_ERROR("EOF in comment");
-       /* XXX hack alert this disables
-        * the stupid unused function warning
-        * gcc generates
-        */
-       if(1 == 0)
-          yy_fatal_error("EOF in comment");
-       break;
+      YY_FATAL_ERROR("EOF in comment");
+
+      /* XXX hack alert this disables
+       * the stupid unused function warning
+       * gcc generates
+       */
+      if (1 == 0)
+        yy_fatal_error("EOF in comment");
+      break;
     }
   }
 }
-