static int pakfire_parser_find_template(struct pakfire_parser* parser,
char* template, const size_t length, const char* namespace) {
+ struct pakfire_parser_declaration* d = NULL;
const char* value = "MAIN";
DEBUG(parser->ctx, "Looking up template in namespace '%s'\n", namespace);
- struct pakfire_parser_declaration* d = pakfire_parser_get_declaration(
- parser, namespace, "template");
-
+ // Fetch the declaration
+ d = pakfire_parser_get_declaration(parser, namespace, "template");
if (d && d->value && *d->value)
value = d->value;