log: move includes to top
authorDavid Herrmann <dh.herrmann@gmail.com>
Mon, 4 Mar 2013 13:27:27 +0000 (14:27 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Mon, 4 Mar 2013 13:27:27 +0000 (14:27 +0100)
There is no reason to include headers in the main body of the source code.
Move it to the top so it's more readable.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
src/log.c

index df8a62d..200a879 100644 (file)
--- a/src/log.c
+++ b/src/log.c
  */
 
 #include <errno.h>
+#include <pthread.h>
 #include <stdarg.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/time.h>
 #include "githead.h"
 #include "log.h"
 #include "shl_misc.h"
@@ -26,8 +28,6 @@
  * We need a global locking mechanism. Use pthread here.
  */
 
-#include <pthread.h>
-
 static pthread_mutex_t log__mutex = PTHREAD_MUTEX_INITIALIZER;
 
 static inline void log_lock()
@@ -46,8 +46,6 @@ static inline void log_unlock()
  * log-message.
  */
 
-#include <sys/time.h>
-
 static struct timeval log__ftime;
 
 static void log__time(long long *sec, long long *usec)