aboutsummaryrefslogtreecommitdiff
path: root/ui/vnc-palette.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/vnc-palette.c')
-rw-r--r--ui/vnc-palette.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/vnc-palette.c b/ui/vnc-palette.c
index c47420b..f93250b 100644
--- a/ui/vnc-palette.c
+++ b/ui/vnc-palette.c
@@ -56,9 +56,15 @@ VncPalette *palette_new(size_t max, int bpp)
VncPalette *palette;
palette = qemu_mallocz(sizeof(*palette));
+ palette_init(palette, max, bpp);
+ return palette;
+}
+
+void palette_init(VncPalette *palette, size_t max, int bpp)
+{
+ memset(palette, 0, sizeof (*palette));
palette->max = max;
palette->bpp = bpp;
- return palette;
}
void palette_destroy(VncPalette *palette)