changeset 37084:e1453cdb2bed

Determine size from variable declaration.
author ib
date Mon, 28 Apr 2014 16:02:20 +0000
parents ae4f30c4ef02
children aadeccf8159b
files gui/interface.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Sat Apr 26 16:32:53 2014 +0000
+++ b/gui/interface.c	Mon Apr 28 16:02:20 2014 +0000
@@ -116,7 +116,7 @@
             vf_settings = settings;
             vf_settings[i].name    = strdup(vf);
             vf_settings[i].attribs = listDup(argvf);
-            memset(&vf_settings[i + 1], 0, sizeof(m_obj_settings_t));
+            memset(&vf_settings[i + 1], 0, sizeof(*vf_settings));
         }
     } else {
         vf_settings = calloc(2, sizeof(*vf_settings));
@@ -176,7 +176,7 @@
                 listFree(&vf_settings[i].attribs);
 
                 do
-                    memcpy(&vf_settings[i], &vf_settings[i + 1], sizeof(m_obj_settings_t));
+                    memcpy(&vf_settings[i], &vf_settings[i + 1], sizeof(*vf_settings));
                 while (vf_settings[++i].name);
 
                 break;