mood.c: Silence gcc warning.
authorAndre Noll <maan@systemlinux.org>
Sun, 25 Mar 2012 12:51:25 +0000 (14:51 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 25 Mar 2012 15:12:55 +0000 (17:12 +0200)
commita98faf997d14e5178a97bd420c4f686b570bd651
treed30adb16a76a72b9aa26c0b0dee9d4d810867efe
parent6101e63b98b5517b65bd967e6efbb0af47738084
mood.c: Silence gcc warning.

The newly released gcc-4.7.0 complains about "m" being used
uninitialized in change_current_mood(). gcc is wrong, but this is
not obvious to see: In change_current_mood(), "m" is only going to
be used if load_mood() returns non-negative. This happens only on
success, when load_mood() returns 1. In this case "m" was previously
set to mlpd.m which was initialized to NULL at the top of load_mood()
and later set to the newly allocated mood structure.

This patch makes it easier for gcc by initializing "m" to NULL
upfront. This causes the warning to go away.
mood.c