Selaa lähdekoodia

core: parser - clang format parser_f.c

Daniel-Constantin Mierla 3 vuotta sitten
vanhempi
commit
03acf834a1
1 muutettua tiedostoa jossa 16 lisäystä ja 11 poistoa
  1. 16 11
      src/core/parser/parser_f.c

+ 16 - 11
src/core/parser/parser_f.c

@@ -15,8 +15,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  *
  */
@@ -28,22 +28,27 @@
  */
 
 
-#include  "parser_f.h"
+#include "parser_f.h"
 #include "../ut.h"
 
 /** @brief returns pointer to next line or after the end of buffer */
-char* eat_line(char* buffer, unsigned int len)
+char *eat_line(char *buffer, unsigned int len)
 {
-	char* nl;
+	char *nl;
 
 	/* jku .. replace for search with a library function; not conforming
  		  as I do not care about CR
 	*/
-	nl=(char *)q_memchr( buffer, '\n', len );
-	if ( nl ) { 
-		if ( nl + 1 < buffer+len)  nl++;
-		if (( nl+1<buffer+len) && * nl=='\r')  nl++;
-	} else  nl=buffer+len;
+	nl = (char *)q_memchr(buffer, '\n', len);
+	if(nl) {
+		if(nl + 1 < buffer + len) {
+			nl++;
+		}
+		if((nl + 1 < buffer + len) && *nl == '\r') {
+			nl++;
+		}
+	} else {
+		nl = buffer + len;
+	}
 	return nl;
 }
-