]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
qga: Clean up includes
authorMarkus Armbruster <armbru@redhat.com>
Thu, 2 Feb 2023 13:38:20 +0000 (14:38 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 8 Feb 2023 06:16:23 +0000 (07:16 +0100)
This commit was created with scripts/clean-includes.

All .c should include qemu/osdep.h first.  The script performs three
related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c  already includes
  it.  Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
  Drop these, too.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20230202133830.2152150-11-armbru@redhat.com>

qga/commands-posix.c
qga/cutils.c
qga/cutils.h

index ebd33a643cf9c35998817cdf59dd20338d90bff8..079689d79a3af5c856d7d04212e78623ebf8b1ff 100644 (file)
@@ -51,7 +51,6 @@
 #else
 #include <net/ethernet.h>
 #endif
-#include <sys/types.h>
 #ifdef CONFIG_SOLARIS
 #include <sys/sockio.h>
 #endif
index b8e142ef649d4bc4461981c501b06f150db98f23..b21bcf3683089c2ec4170edb5eb3fccb59276ec1 100644 (file)
@@ -2,8 +2,9 @@
  * This work is licensed under the terms of the GNU GPL, version 2 or later.
  * See the COPYING file in the top-level directory.
  */
-#include "cutils.h"
 
+#include "qemu/osdep.h"
+#include "cutils.h"
 #include "qapi/error.h"
 
 /**
index f0f30a7d28aa8edbdb7bf82aba57871422189ef1..c1f2f4b17a0f0ab8ed1b1da732daeb23f5190786 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef CUTILS_H_
 #define CUTILS_H_
 
-#include "qemu/osdep.h"
-
 int qga_open_cloexec(const char *name, int flags, mode_t mode);
 
 #endif /* CUTILS_H_ */