Mercurial > gftp.yaz
comparison src/gtk/misc-gtk.c @ 659:b8faf63b2e9b
2005-1-16 Brian Masney <masneyb@gftp.org>
* src/gtk/misc-gtk.c (MakeEditDialog, MakeYesNoDialog) - use
g_malloc0() instead of g_malloc() to allocate the structures. This
ensures that all of the pointers are initialized to NULL (closes
#162762)
author | masneyb |
---|---|
date | Sun, 16 Jan 2005 15:35:21 +0000 |
parents | 461ae1bba8b6 |
children | 8990a8a26ccf |
comparison
equal
deleted
inserted
replaced
658:219bb535750b | 659:b8faf63b2e9b |
---|---|
914 { | 914 { |
915 GtkWidget * tempwid, * dialog; | 915 GtkWidget * tempwid, * dialog; |
916 gftp_dialog_data * ddata; | 916 gftp_dialog_data * ddata; |
917 const gchar * yes_text; | 917 const gchar * yes_text; |
918 | 918 |
919 ddata = g_malloc (sizeof (*ddata)); | 919 ddata = g_malloc0 (sizeof (*ddata)); |
920 ddata->yesfunc = okfunc; | 920 ddata->yesfunc = okfunc; |
921 ddata->yespointer = okptr; | 921 ddata->yespointer = okptr; |
922 ddata->nofunc = cancelfunc; | 922 ddata->nofunc = cancelfunc; |
923 ddata->nopointer = cancelptr; | 923 ddata->nopointer = cancelptr; |
924 | 924 |
1063 gftp_dialog_data * ddata; | 1063 gftp_dialog_data * ddata; |
1064 #if GTK_MAJOR_VERSION == 1 | 1064 #if GTK_MAJOR_VERSION == 1 |
1065 GtkWidget * tempwid; | 1065 GtkWidget * tempwid; |
1066 #endif | 1066 #endif |
1067 | 1067 |
1068 ddata = g_malloc (sizeof (*ddata)); | 1068 ddata = g_malloc0 (sizeof (*ddata)); |
1069 ddata->yesfunc = yesfunc; | 1069 ddata->yesfunc = yesfunc; |
1070 ddata->yespointer = yespointer; | 1070 ddata->yespointer = yespointer; |
1071 ddata->nofunc = nofunc; | 1071 ddata->nofunc = nofunc; |
1072 ddata->nopointer = nopointer; | 1072 ddata->nopointer = nopointer; |
1073 | 1073 |