libpayload: fix compiler warning for first_cmos_entry()
authorMathias Krause <mathias.krause@secunet.com>
Fri, 17 Feb 2012 10:53:28 +0000 (11:53 +0100)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Fri, 17 Feb 2012 18:24:11 +0000 (19:24 +0100)
commit632ab1ff6501e87b2b51da88f9dd9ca7b1b90e49
treed8e36e22157d511c77abe4ed689e96dc93165e27
parentf01291dd64175b0c03a218f5ee4ad306ad779183
libpayload: fix compiler warning for first_cmos_entry()

The 'name' argument to lookup_cmos_entry() is declared to be 'char *'
but we pass an empty string ("") which is 'const char[]' so the compiler
legitimatly warns about discarded qualifiers here. Fix this by passing
NULL as 'name'.

Minor nitpick: The NULL test in lookup_cmos_entry() is superfluous as our
implementation of strnlen() can handle NULL pointers gracefully. But for
an average C hacker it just doesn't feel right not to do so.

Change-Id: I592917d12d8fa840804c0d19e38b844427064fef
Signed-off-by: Mathias Krause <mathias.krause@secunet.com>
Reviewed-on: http://review.coreboot.org/651
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
payloads/libpayload/drivers/options.c