Patchwork [09/24] ui/vnc-pallete.c: include headers it needs

login
register
mail settings
Submitter Eduardo Habkost
Date Nov. 9, 2012, 2:56 p.m.
Message ID <1352473012-20500-10-git-send-email-ehabkost@redhat.com>
Download mbox | patch
Permalink /patch/198106/
State New
Headers show

Comments

Eduardo Habkost - Nov. 9, 2012, 2:56 p.m.
Include:
 - <glib.h> for g_malloc0()
 - <string.h> for memset()

Some of those headers were probably being included by accident because
some other headers were including qemu-common.h, but those headers
should eventually stop including qemu-common.h.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 ui/vnc-palette.c | 2 ++
 1 file changed, 2 insertions(+)
Peter Maydell - Nov. 9, 2012, 4:46 p.m.
On 9 November 2012 15:56, Eduardo Habkost <ehabkost@redhat.com> wrote:
> Include:
>  - <glib.h> for g_malloc0()
>  - <string.h> for memset()
>
> Some of those headers were probably being included by accident because
> some other headers were including qemu-common.h, but those headers
> should eventually stop including qemu-common.h.

Typo in subject: should be 'palette'.

-- PMM
Andreas Färber - Nov. 14, 2012, 2:37 p.m.
Am 09.11.2012 15:56, schrieb Eduardo Habkost:
> Include:
>  - <glib.h> for g_malloc0()
>  - <string.h> for memset()
> 
> Some of those headers were probably being included by accident because
> some other headers were including qemu-common.h, but those headers
> should eventually stop including qemu-common.h.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Acked-by: Andreas Färber <afaerber@suse.de>

Subject fixed.

Andreas

Patch

diff --git a/ui/vnc-palette.c b/ui/vnc-palette.c
index 63d5f64..c130dee 100644
--- a/ui/vnc-palette.c
+++ b/ui/vnc-palette.c
@@ -27,6 +27,8 @@ 
  */
 
 #include "vnc-palette.h"
+#include <glib.h>
+#include <string.h>
 
 static VncPaletteEntry *palette_find(const VncPalette *palette,
                                      uint32_t color, unsigned int hash)