This avoids checking for NULL and empty string further down the line
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
static const char* pakfire_parser_get_raw(PakfireParser parser, const char* name) {
struct pakfire_parser_declaration* d = pakfire_parser_get_declaration(parser, name);
- // Return a match
- if (d)
- return d->value;
+ // Return a match when it actually contains a string
+ if (d) {
+ if (d->value && *d->value)
+ return d->value;
+
+ return NULL;
+ }
// Search in parent parser if available
if (parser->parent)