[spice-gtk v1 2/7] gtk-session: initialize array without memset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Victor Toso <me@xxxxxxxxxxxxxx>

Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>
---
 src/spice-gtk-session.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/spice-gtk-session.c b/src/spice-gtk-session.c
index 3c78e6a..bc47f6b 100644
--- a/src/spice-gtk-session.c
+++ b/src/spice-gtk-session.c
@@ -611,7 +611,7 @@ static void clipboard_get_targets(GtkClipboard *clipboard,
     g_return_if_fail(SPICE_IS_GTK_SESSION(self));
 
     SpiceGtkSessionPrivate *s = self->priv;
-    guint32 types[SPICE_N_ELEMENTS(atom2agent)];
+    guint32 types[SPICE_N_ELEMENTS(atom2agent)] = { 0 };
     char *name;
     int a, m, t;
     int selection;
@@ -631,7 +631,6 @@ static void clipboard_get_targets(GtkClipboard *clipboard,
         }
     }
 
-    memset(types, 0, sizeof(types));
     for (a = 0; a < n_atoms; a++) {
         name = gdk_atom_name(atoms[a]);
         for (m = 0; m < SPICE_N_ELEMENTS(atom2agent); m++) {
-- 
2.9.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]