qga: Add multiple include guard to guest-agent-core.h
PATCH 1/1 qga: Add multiple include guard to guest-agent-core.h
The guest-agent-core.h header was missing the usual guards against multiple inclusion; add them.
(Spotted by lgtm.com's static analyzer.)
Signed-off-by Peter Maydell <[email protected]>
--- qga/guest-agent-core.h | 5 +++++ 1 file changed, 5 insertions(+)
qga/guest-agent-core.h +5 -0
@@ -10,6 +10,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. */ +#ifndef GUEST_AGENT_CORE_H +#define GUEST_AGENT_CORE_H +#include "qapi/qmp/dispatch.h" #include "qemu-common.h" #include "qga-qapi-types.h"
@@ -46,3 +49,5 @@ int ga_parse_whence(GuestFileWhence *whence, Error **errp);#ifndef _WIN32void reopen_fd_to_null (int fd);#endif + +#endif /* GUEST_AGENT_CORE_H */
Signature · 1 line
2.19.1
Quoted 6 lines · Peter Maydell
The
guest-agent-core.hheader was missing the usual guards against multiple inclusion; add them.(Spotted by lgtm.com's static analyzer.)
Signed-off-by Peter Maydell <[email protected]>
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Quoted 25 lines
--- qga/guest-agent-core.h | 5 +++++ 1 file changed, 5 insertions(+)qga/guest-agent-core.h +5
-0@@ -10,6 +10,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. */ +#ifndef GUEST_AGENT_CORE_H +#define GUEST_AGENT_CORE_H +#include "qapi/qmp/dispatch.h" #include "qemu-common.h" #include "qga-qapi-types.h" @@ -46,3 +49,5 @@ int ga_parse_whence(GuestFileWhence *whence, Error **errp);#ifndef _WIN32void reopen_fd_to_null (int fd);#endif + +#endif /* GUEST_AGENT_CORE_H */
Hi
Quoted 5 lines · Peter Maydell
The
guest-agent-core.hheader was missing the usual guards against multiple inclusion; add them.(Spotted by lgtm.com's static analyzer.)
neat,
Reviewed-by Marc-André Lureau <[email protected]>
Quoted 30 lines
Signed-off-by Peter Maydell <[email protected]>--- qga/guest-agent-core.h | 5 +++++ 1 file changed, 5 insertions(+)qga/guest-agent-core.h +5
-1@@ -10,6 +10,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. */ +#ifndef GUEST_AGENT_CORE_H +#define GUEST_AGENT_CORE_H +#include "qapi/qmp/dispatch.h" #include "qemu-common.h" #include "qga-qapi-types.h" @@ -46,3 +49,5 @@ int ga_parse_whence(GuestFileWhence *whence, Error **errp);#ifndef _WIN32void reopen_fd_to_null (int fd);#endif + +#endif /* GUEST_AGENT_CORE_H */ --2.19.1
Signature · 1 line
Marc-André Lureau
Michael Roth
AppliedQuoting Peter Maydell (2018-11-08 06:52:23)
Quoted 6 lines
The
guest-agent-core.hheader was missing the usual guards against multiple inclusion; add them.(Spotted by lgtm.com's static analyzer.)
Signed-off-by Peter Maydell <[email protected]>
Thanks, applied to qga tree:
https://github.com/mdroth/qemu/commits/qga
Quoted 27 lines
--- qga/guest-agent-core.h | 5 +++++ 1 file changed, 5 insertions(+)qga/guest-agent-core.h +5
-0@@ -10,6 +10,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. */ +#ifndef GUEST_AGENT_CORE_H +#define GUEST_AGENT_CORE_H +#include "qapi/qmp/dispatch.h" #include "qemu-common.h" #include "qga-qapi-types.h" @@ -46,3 +49,5 @@ int ga_parse_whence(GuestFileWhence *whence, Error **errp);#ifndef _WIN32void reopen_fd_to_null (int fd);#endif + +#endif /* GUEST_AGENT_CORE_H */ Signature · 1 line
2.19.1