gftp r949 - in trunk: . src/gtk src/uicommon



Author: masneyb
Date: Thu Jan 24 23:26:45 2008
New Revision: 949
URL: http://svn.gnome.org/viewvc/gftp?rev=949&view=rev

Log:
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/



Modified:
   trunk/ChangeLog
   trunk/src/gtk/bookmarks.c
   trunk/src/gtk/dnd.c
   trunk/src/gtk/gftp-gtk.c
   trunk/src/gtk/gtkui_transfer.c
   trunk/src/gtk/menu-items.c
   trunk/src/gtk/transfer.c
   trunk/src/uicommon/gftpui.c

Modified: trunk/src/gtk/bookmarks.c
==============================================================================
--- trunk/src/gtk/bookmarks.c	(original)
+++ trunk/src/gtk/bookmarks.c	Thu Jan 24 23:26:45 2008
@@ -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++;

Modified: trunk/src/gtk/dnd.c
==============================================================================
--- trunk/src/gtk/dnd.c	(original)
+++ trunk/src/gtk/dnd.c	Thu Jan 24 23:26:45 2008
@@ -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';
 

Modified: trunk/src/gtk/gftp-gtk.c
==============================================================================
--- trunk/src/gtk/gftp-gtk.c	(original)
+++ trunk/src/gtk/gftp-gtk.c	Thu Jan 24 23:26:45 2008
@@ -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);

Modified: trunk/src/gtk/gtkui_transfer.c
==============================================================================
--- trunk/src/gtk/gtkui_transfer.c	(original)
+++ trunk/src/gtk/gtkui_transfer.c	Thu Jan 24 23:26:45 2008
@@ -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;
 

Modified: trunk/src/gtk/menu-items.c
==============================================================================
--- trunk/src/gtk/menu-items.c	(original)
+++ trunk/src/gtk/menu-items.c	Thu Jan 24 23:26:45 2008
@@ -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;
 

Modified: trunk/src/gtk/transfer.c
==============================================================================
--- trunk/src/gtk/transfer.c	(original)
+++ trunk/src/gtk/transfer.c	Thu Jan 24 23:26:45 2008
@@ -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, 

Modified: trunk/src/uicommon/gftpui.c
==============================================================================
--- trunk/src/uicommon/gftpui.c	(original)
+++ trunk/src/uicommon/gftpui.c	Thu Jan 24 23:26:45 2008
@@ -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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]