Mercurial > mplayer.hg
comparison gui/interface.c @ 37084:e1453cdb2bed
Determine size from variable declaration.
author | ib |
---|---|
date | Mon, 28 Apr 2014 16:02:20 +0000 |
parents | ae4f30c4ef02 |
children | aadeccf8159b |
comparison
equal
deleted
inserted
replaced
37083:ae4f30c4ef02 | 37084:e1453cdb2bed |
---|---|
114 return; | 114 return; |
115 | 115 |
116 vf_settings = settings; | 116 vf_settings = settings; |
117 vf_settings[i].name = strdup(vf); | 117 vf_settings[i].name = strdup(vf); |
118 vf_settings[i].attribs = listDup(argvf); | 118 vf_settings[i].attribs = listDup(argvf); |
119 memset(&vf_settings[i + 1], 0, sizeof(m_obj_settings_t)); | 119 memset(&vf_settings[i + 1], 0, sizeof(*vf_settings)); |
120 } | 120 } |
121 } else { | 121 } else { |
122 vf_settings = calloc(2, sizeof(*vf_settings)); | 122 vf_settings = calloc(2, sizeof(*vf_settings)); |
123 | 123 |
124 if (!vf_settings) | 124 if (!vf_settings) |
174 | 174 |
175 free(vf_settings[i].name); | 175 free(vf_settings[i].name); |
176 listFree(&vf_settings[i].attribs); | 176 listFree(&vf_settings[i].attribs); |
177 | 177 |
178 do | 178 do |
179 memcpy(&vf_settings[i], &vf_settings[i + 1], sizeof(m_obj_settings_t)); | 179 memcpy(&vf_settings[i], &vf_settings[i + 1], sizeof(*vf_settings)); |
180 while (vf_settings[++i].name); | 180 while (vf_settings[++i].name); |
181 | 181 |
182 break; | 182 break; |
183 } | 183 } |
184 | 184 |