changeset 941:19b6d55e2646

2008-01-24 Brian Masney <masneyb@gftp.org> * src/gtk/gftp-gtk.c src/gtk/menu-items.c src/gtk/transfer.c src/gtk/dnd.c src/gtk/gtkui_transfer.c src/gtk/bookmarks.c src/uicommon/gftpui.c - s/g_malloc/g_malloc0/
author masneyb
date Thu, 24 Jan 2008 23:26:45 +0000
parents 6d5ea489c033
children 85cf59eafce2
files ChangeLog src/gtk/bookmarks.c src/gtk/dnd.c src/gtk/gftp-gtk.c src/gtk/gtkui_transfer.c src/gtk/menu-items.c src/gtk/transfer.c src/uicommon/gftpui.c
diffstat 8 files changed, 15 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jan 07 13:54:09 2008 +0000
+++ b/ChangeLog	Thu Jan 24 23:26:45 2008 +0000
@@ -1,3 +1,8 @@
+2008-01-24 Brian Masney <masneyb@gftp.org>
+	* src/gtk/gftp-gtk.c src/gtk/menu-items.c src/gtk/transfer.c
+	src/gtk/dnd.c src/gtk/gtkui_transfer.c src/gtk/bookmarks.c
+	src/uicommon/gftpui.c - s/g_malloc/g_malloc0/
+
 2007-10-4 Brian Masney <masneyb@gftp.org>
 	* MAINTAINERS - added maintainers file
 
--- a/src/gtk/bookmarks.c	Mon Jan 07 13:54:09 2008 +0000
+++ b/src/gtk/bookmarks.c	Thu Jan 24 23:26:45 2008 +0000
@@ -81,7 +81,7 @@
 
   tempentry = g_malloc0 (sizeof (*tempentry));
 
-  dpos = tempentry->path = g_malloc ((gulong) strlen (edttxt) + 1);
+  dpos = tempentry->path = g_malloc0 ((gulong) strlen (edttxt) + 1);
   for (spos = edttxt; *spos != '\0';)
     {
       *dpos++ = *spos++;
--- a/src/gtk/dnd.c	Mon Jan 07 13:54:09 2008 +0000
+++ b/src/gtk/dnd.c	Thu Jan 24 23:26:45 2008 +0000
@@ -216,7 +216,7 @@
         } 
       else
         {
-          str = g_malloc ((gulong) totlen + 1);
+          str = g_malloc0 ((gulong) totlen + 1);
           strcpy (str, tempstr);
         }
       g_free (tempstr);
@@ -262,7 +262,7 @@
           if (len == 0)
             break;
 
-          tempstr = g_malloc ((gulong) len + 1);
+          tempstr = g_malloc0 ((gulong) len + 1);
           memcpy (tempstr, oldpos, len);
           tempstr[len] = '\0';
 
--- a/src/gtk/gftp-gtk.c	Mon Jan 07 13:54:09 2008 +0000
+++ b/src/gtk/gftp-gtk.c	Thu Jan 24 23:26:45 2008 +0000
@@ -1281,7 +1281,7 @@
 
   gftp_config_parse_args (str, 3, line, &red, &green, &blue);
 
-  color = g_malloc (sizeof (*color));
+  color = g_malloc0 (sizeof (*color));
   color->red = strtol (red, NULL, 16);
   color->green = strtol (green, NULL, 16);
   color->blue = strtol (blue, NULL, 16);
--- a/src/gtk/gtkui_transfer.c	Mon Jan 07 13:54:09 2008 +0000
+++ b/src/gtk/gtkui_transfer.c	Thu Jan 24 23:26:45 2008 +0000
@@ -65,7 +65,7 @@
                                           tdata->user_data, NULL, text, 5,
                                           NULL, NULL, NULL, NULL,
                                           FALSE, FALSE);
-  transdata = g_malloc (sizeof (*transdata));
+  transdata = g_malloc0 (sizeof (*transdata));
   transdata->transfer = tdata;
   transdata->curfle = curfle;
 
--- a/src/gtk/menu-items.c	Mon Jan 07 13:54:09 2008 +0000
+++ b/src/gtk/menu-items.c	Thu Jan 24 23:26:45 2008 +0000
@@ -142,7 +142,7 @@
 
   filew = gtk_file_selection_new (_("Save Directory Listing"));
 
-  str = g_malloc (sizeof (*str));
+  str = g_malloc0 (sizeof (*str));
   str->filew = filew;
   str->wdata = data;
 
--- a/src/gtk/transfer.c	Mon Jan 07 13:54:09 2008 +0000
+++ b/src/gtk/transfer.c	Thu Jan 24 23:26:45 2008 +0000
@@ -524,7 +524,7 @@
                                        opendir_pixmap, opendir_bitmap, 
                                        FALSE, 
                                        tdata->numdirs + tdata->numfiles < 50);
-  transdata = g_malloc (sizeof (*transdata));
+  transdata = g_malloc0 (sizeof (*transdata));
   transdata->transfer = tdata;
   transdata->curfle = NULL;
   gtk_ctree_node_set_row_data (GTK_CTREE (dlwdw), tdata->user_data, transdata);
@@ -549,7 +549,7 @@
                                              tdata->user_data, 
                                              NULL, text, 5, NULL, NULL, NULL, 
                                              NULL, FALSE, FALSE);
-      transdata = g_malloc (sizeof (*transdata));
+      transdata = g_malloc0 (sizeof (*transdata));
       transdata->transfer = tdata;
       transdata->curfle = templist;
       gtk_ctree_node_set_row_data (GTK_CTREE (dlwdw), tempfle->user_data, 
--- a/src/uicommon/gftpui.c	Mon Jan 07 13:54:09 2008 +0000
+++ b/src/uicommon/gftpui.c	Thu Jan 24 23:26:45 2008 +0000
@@ -874,7 +874,7 @@
         }
 
       tdata->files = g_list_append (tdata->files, fle);
-      fle = g_malloc (sizeof (*fle));
+      fle = g_malloc0 (sizeof (*fle));
     }
 
   g_free (fle);
@@ -1262,7 +1262,7 @@
   int ret;
 
   gftp_lookup_request_option (tdata->fromreq, "trans_blksize", &trans_blksize);
-  buf = g_malloc (trans_blksize);
+  buf = g_malloc0 (trans_blksize);
 
   memset (&updatetime, 0, sizeof (updatetime));
   gftpui_start_current_file_in_transfer (tdata);