[waffle] [PATCH 05/10] waffle: remove found_platform from waffle_init_parse_attrib_list

Chad Versace chad.versace at intel.com
Thu Jun 5 23:25:41 PDT 2014


On Sat, May 31, 2014 at 03:22:03AM +0100, Emil Velikov wrote:
> Whenever a platform is missing a case statement, the default will
> kick in throwing an error and exiting the function.

Ah, but that's not what 'found_platform' is checking for...

> -    if (!found_platform) {
> -        wcore_errorf(WAFFLE_ERROR_BAD_ATTRIBUTE,
> -                     "attribute list is missing WAFFLE_PLATFORM");
> -        return false;
> -    }

... waffle_init() uses 'found_platform' to check if the user provided
WAFFLE_PLATFORM.

I admit that waffle_init_parse_attrib_list() is a clumsily written
function. It was one of the very first functions in Waffle's codebase.


More information about the waffle mailing list