[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 04/17] Drop unneeded system header includes
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 04/17] Drop unneeded system header includes |
Date: |
Sat, 10 Feb 2018 10:54:59 +0300 |
From: Eric Blake <address@hidden>
<memory.h> is a non-standard obsolete header that was long ago
replaced by <string.h>.
<malloc.h> is a non-standard header; it is not obsolete (we must
use it for malloc_trim, for example), but generally should not
be used in files that just need malloc() and friends, where
<stdlib.h> is the standard header.
And since osdep.h already guarantees string.h and stdlib.h, we
can drop these unusual system header includes as redundant
rather than replacing them.
Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
---
target/i386/hax-windows.h | 2 --
target/i386/hvf/x86_mmu.c | 1 -
2 files changed, 3 deletions(-)
diff --git a/target/i386/hax-windows.h b/target/i386/hax-windows.h
index 004f867694..20e2f85407 100644
--- a/target/i386/hax-windows.h
+++ b/target/i386/hax-windows.h
@@ -20,8 +20,6 @@
#ifndef TARGET_I386_HAX_WINDOWS_H
#define TARGET_I386_HAX_WINDOWS_H
-#include <memory.h>
-#include <malloc.h>
#include <winioctl.h>
#include <windef.h>
diff --git a/target/i386/hvf/x86_mmu.c b/target/i386/hvf/x86_mmu.c
index c6be2cca35..d5a0efe718 100644
--- a/target/i386/hvf/x86_mmu.c
+++ b/target/i386/hvf/x86_mmu.c
@@ -17,7 +17,6 @@
*/
#include "qemu/osdep.h"
-#include <memory.h>
#include "panic.h"
#include "qemu-common.h"
#include "cpu.h"
--
2.11.0
- [Qemu-trivial] [PULL 17/17] tests/qapi: use ARRAY_SIZE macro, (continued)
- [Qemu-trivial] [PULL 17/17] tests/qapi: use ARRAY_SIZE macro, Michael Tokarev, 2018/02/10
- [Qemu-trivial] [PULL 16/17] tests/qapi: use QEMU_IS_ALIGNED macro, Michael Tokarev, 2018/02/10
- [Qemu-trivial] [PULL 10/17] maint: Mention web site maintenance in README, Michael Tokarev, 2018/02/10
- [Qemu-trivial] [PULL 13/17] qga: use ARRAY_SIZE macro, Michael Tokarev, 2018/02/10
- [Qemu-trivial] [PULL 11/17] oslib-posix: check for posix_memalign in configure script, Michael Tokarev, 2018/02/10
- [Qemu-trivial] [PULL 12/17] MAINTAINERS: Add qemu-binfmt-conf.sh script, Michael Tokarev, 2018/02/10
- [Qemu-trivial] [PULL 09/17] build: fix typo in error message, Michael Tokarev, 2018/02/10
- [Qemu-trivial] [PULL 14/17] async: use ARRAY_SIZE macro, Michael Tokarev, 2018/02/10
- [Qemu-trivial] [PULL 08/17] configure: Allow capstone=git only if git update is not disabled, Michael Tokarev, 2018/02/10
- [Qemu-trivial] [PULL 07/17] scripts/make-release: Don't archive .git files, Michael Tokarev, 2018/02/10
- [Qemu-trivial] [PULL 04/17] Drop unneeded system header includes,
Michael Tokarev <=
- Re: [Qemu-trivial] [Qemu-devel] [PULL 00/17] Trivial patches for 2018-02-10, Peter Maydell, 2018/02/12