Calloc then memcpy is superflux.
This commit is contained in:
parent
9755182577
commit
a6718b40ce
1 changed files with 3 additions and 3 deletions
|
@ -347,10 +347,10 @@ local SCM CclDisplayPicture(SCM file)
|
|||
*/
|
||||
local SCM CclProcessMenu(SCM id)
|
||||
{
|
||||
char *mid;
|
||||
char* mid;
|
||||
|
||||
mid = gh_scm2newstr(id, NULL);
|
||||
if (hash_find(MenuHash, mid)) {
|
||||
if (FindMenu(mid)) {
|
||||
ProcessMenu(mid, 1);
|
||||
}
|
||||
free(mid);
|
||||
|
@ -1458,7 +1458,7 @@ local SCM CclDefineMenu(SCM list)
|
|||
}
|
||||
|
||||
if (name) {
|
||||
menu = (Menu*)calloc(1,sizeof(Menu));
|
||||
menu = malloc(sizeof(Menu));
|
||||
memcpy(menu, &item, sizeof(Menu));
|
||||
menu->nitems = 0; // reset to zero
|
||||
//move the buttons for different resolutions..
|
||||
|
|
Loading…
Add table
Reference in a new issue