diff src/gtk/misc-gtk.c @ 518:c6a6e908dbaf

2004-7-27 Brian Masney <masneyb@gftp.org> * lib/protocols.c lib/rfc2068.c lib/rfc959.c lib/sshv2.c src/gtk/bookmarks.c src/gtk/dnd.c src/gtk/gftp-gtk.c src/gtk/gtui.c src/gtk/menu-items.c src/misc-gtk.c src/gtk/options_dialog.c src/gtk/transfer.c src/text/gftp-text.c src/uicommon/gftpui.c - various fixes found through a static code analysis. (some signed/unsigned fixes, removed unneeded casts, indentation fixes, added static declaration to some functions)
author masneyb
date Wed, 28 Jul 2004 01:37:15 +0000
parents 648bf2825ea9
children c3edcd3e9db9
line wrap: on
line diff
--- a/src/gtk/misc-gtk.c	Tue Jul 27 20:43:39 2004 +0000
+++ b/src/gtk/misc-gtk.c	Wed Jul 28 01:37:15 2004 +0000
@@ -17,7 +17,7 @@
 /*  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                */
 /*****************************************************************************/
 
-#include <gftp-gtk.h>
+#include "gftp-gtk.h"
 static const char cvsid[] = "$Id$";
 
 static GtkWidget * statuswid;
@@ -41,11 +41,10 @@
 {
   uintptr_t max_log_window_size;
   int upd, free_logstr;
+  size_t len, delsize;
   gftp_log * newlog;
   char *logstr;
-  gint delsize;
   va_list argp;
-  guint len;
 #if GTK_MAJOR_VERSION == 1
   gftp_color * color;
   GdkColor fore;
@@ -233,14 +232,14 @@
           g_free (tempstr);
         }
 
-     for (i=0; gftp_protocols[i].init != NULL; i++)
-       {
-         if (current_wdata->request->init == gftp_protocols[i].init)
-           {
-             gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), i);
-             break;
-           }
-       }
+      for (i=0; gftp_protocols[i].init != NULL; i++)
+        {
+          if (current_wdata->request->init == gftp_protocols[i].init)
+            {
+              gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), i);
+              break;
+            }
+        }
     }
 
   update_window (&window1);
@@ -563,12 +562,15 @@
 create_item_factory (GtkItemFactory * ifactory, guint n_entries,
 		     GtkItemFactoryEntry * entries, gpointer callback_data)
 {
+  const char *strip_prefix;
+  size_t strip_prefix_len;
   int i;
-  const char *strip_prefix = gtk_object_get_data (GTK_OBJECT (ifactory), "gftp-strip-prefix");
-  int strip_prefix_len = 0;
 
+  strip_prefix = gtk_object_get_data (GTK_OBJECT (ifactory), "gftp-strip-prefix");
   if (strip_prefix)
     strip_prefix_len = strlen (strip_prefix);
+  else
+    strip_prefix_len = 0;
 
   for (i = 0; i < n_entries; i++)
     {