summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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)