main: clean up variable printer now that we have pkg_tuple_parse
parent
30fe1fae39
commit
ded3ce7aff
11
main.c
11
main.c
|
@ -166,18 +166,13 @@ print_modversion(pkg_t *pkg, void *unused)
|
||||||
static void
|
static void
|
||||||
print_variable(pkg_t *pkg, void *unused)
|
print_variable(pkg_t *pkg, void *unused)
|
||||||
{
|
{
|
||||||
const char *variable_tmpl;
|
const char *var;
|
||||||
(void) unused;
|
(void) unused;
|
||||||
|
|
||||||
variable_tmpl = pkg_tuple_find(pkg->vars, want_variable);
|
var = pkg_tuple_find(pkg->vars, want_variable);
|
||||||
if (variable_tmpl != NULL)
|
if (var != NULL)
|
||||||
{
|
{
|
||||||
char *var = pkg_tuple_parse(pkg->vars, variable_tmpl);
|
|
||||||
|
|
||||||
printf("%s", var);
|
printf("%s", var);
|
||||||
|
|
||||||
free(var);
|
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue