diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2013-03-04 14:27:27 +0100 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2013-03-04 14:27:27 +0100 |
commit | f14fde004f67171eaaa20081f475d49089a9ace3 (patch) | |
tree | 2a8fa64700be1893f2463be378f319cac53986b6 /src | |
parent | 87e1cf03f264cf53d2dd65d9ae17242785484d87 (diff) |
log: move includes to top
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/log.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -12,11 +12,13 @@ */ #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) |