samples: net: irc_bot: fix null pointer deref

samples/net/irc_bot/src/irc-bot.c:368:36:
warning: 'c' may be used uninitialized in this function
[-Wmaybe-uninitialized]
  for (cc = &chan->irc->chans, c = c->irc->chans;
                                   ^
As suggested by Leandro Pereira <leandro.pereira@intel.com>
adjusted to:
  for (cc = &chan->irc->chans, c = chan->irc->chans;

Change-Id: Icd490059e0b97f95408dd7bad3f1783a215c5edb
Signed-off-by: Michael Scott <michael.scott@linaro.org>
diff --git a/samples/net/irc_bot/src/irc-bot.c b/samples/net/irc_bot/src/irc-bot.c
index 8683a27..0b66953 100644
--- a/samples/net/irc_bot/src/irc-bot.c
+++ b/samples/net/irc_bot/src/irc-bot.c
@@ -364,7 +364,7 @@
 		return ret;
 	}
 
-	for (cc = &chan->irc->chans, c = c->irc->chans;
+	for (cc = &chan->irc->chans, c = chan->irc->chans;
 	     c; cc = &c->next, c = c->next) {
 		if (c == chan) {
 			*cc = c->next;