瀏覽代碼

Move includes to the file that actually uses them

This was spotted thanks to clang-format reordering the includes.
Even with the new config, it will include the header file for the
current source file first. Nevertheless, it is best to always include
header files where they are needed.
Ahsan Fayaz 1 年之前
父節點
當前提交
485a7f920a
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 0 2
      common/common-cpu.c
  2. 3 0
      common/common-cpu.h

+ 0 - 2
common/common-cpu.c

@@ -31,8 +31,6 @@ POSSIBILITY OF SUCH DAMAGE.
 
 #include "common-cpu.h"
 #include "common-logging.h"
-#include <sched.h>
-#include <stdlib.h>
 
 char *parse_cpulist(char *cpulist, long *from, long *to)
 {

+ 3 - 0
common/common-cpu.h

@@ -31,6 +31,9 @@ POSSIBILITY OF SUCH DAMAGE.
 
 #pragma once
 
+#include <sched.h>
+#include <stdlib.h>
+
 #define IS_CPU_PARK 0
 #define IS_CPU_PIN 1