forked from ariadne/pkgconf
main: print_variable(): use strdup_parse().
parent
8ff4ae5b16
commit
542e4e6f89
14
main.c
14
main.c
|
@ -164,12 +164,18 @@ 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)
|
||||||
{
|
{
|
||||||
char *variable;
|
const char *variable_tmpl;
|
||||||
(void) unused;
|
(void) unused;
|
||||||
|
|
||||||
variable = tuple_find(pkg->vars, want_variable);
|
variable_tmpl = tuple_find(pkg->vars, want_variable);
|
||||||
if (variable != NULL)
|
if (variable_tmpl != NULL)
|
||||||
printf("%s ", variable);
|
{
|
||||||
|
char *var = strdup_parse(pkg, variable_tmpl);
|
||||||
|
|
||||||
|
printf("%s ", var);
|
||||||
|
|
||||||
|
free(var);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue