summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-12-31 11:12:43 -0500
committerTingPing <tingping@tingping.se>2014-12-31 11:12:43 -0500
commit112632bb4ecfc54dba6346c1a9c3af9861c6a74b (patch)
tree689e7d65ce866f5df17de4abcb9c896f1ff24f66 /src
parentc5016e390ff6bb4e3aa65db0b446d9cbac42994b (diff)
Fix some possible null-deref warnings
Diffstat (limited to 'src')
-rw-r--r--src/common/hexchat.c2
-rw-r--r--src/common/outbound.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/common/hexchat.c b/src/common/hexchat.c
index 71ea9791..fdae21d0 100644
--- a/src/common/hexchat.c
+++ b/src/common/hexchat.c
@@ -220,7 +220,7 @@ find_channel (server *serv, char *chan)
 	while (list)
 	{
 		sess = list->data;
-		if ((!serv || serv == sess->server) && sess->type == SESS_CHANNEL)
+		if ((serv == sess->server) && sess->type == SESS_CHANNEL)
 		{
 			if (!serv->p_cmp (chan, sess->channel))
 				return sess;
diff --git a/src/common/outbound.c b/src/common/outbound.c
index fe62bc2a..0df9c37c 100644
--- a/src/common/outbound.c
+++ b/src/common/outbound.c
@@ -1311,7 +1311,7 @@ cmd_menu (struct session *sess, char *tbuf, char *word[], char *word_eol[])
 	if (markup)
 	{
 		char *p;	/* to force pango closing tags through */
-		for (p = label; *p; p++)
+		for (p = label; p && *p; p++)
 			if (*p == 3)
 				*p = '/';
 	}