summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2013-11-22 16:53:50 -0500
committerTingPing <tingping@tingping.se>2013-11-22 16:53:50 -0500
commit5c223ec5d55d82ab8dd1fc81c7cea5caf36ade45 (patch)
tree10ffeff11948dc3ae3715f32dde9cdb478ea0f76 /src
parenta656cee382c10695805a237a44bde97184537656 (diff)
Fix more warnings
Diffstat (limited to 'src')
-rw-r--r--src/common/cfgfiles.c8
-rw-r--r--src/common/plugin.c3
2 files changed, 5 insertions, 6 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index 8283765b..7d0e9c91 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -1085,12 +1085,10 @@ set_showval (session *sess, const struct prefs *var, char *tbuf)
 
 	len = strlen (var->name);
 	memcpy (tbuf, var->name, len);
-	dots = 29 - len;
-
-	if (dots < 0)
-	{
+	if (len > 29)
 		dots = 0;
-	}
+	else
+		dots = 29 - len;
 
 	tbuf[len++] = '\003';
 	tbuf[len++] = '2';
diff --git a/src/common/plugin.c b/src/common/plugin.c
index 228983f3..45746777 100644
--- a/src/common/plugin.c
+++ b/src/common/plugin.c
@@ -1548,7 +1548,8 @@ hexchat_list_int (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
 {
 	guint32 hash = str_hash (name);
 	gpointer data = ph->context;
-	int tmp, type = LIST_CHANNELS;
+	int tmp = 0;
+	int type = LIST_CHANNELS;
 
 	/* a NULL xlist is a shortcut to current "channels" context */
 	if (xlist)