pkg: do not print cflags or libs if they are NULL

pull/1/merge
William Pitcock 2011-07-24 23:43:00 -05:00
parent b44ce20d29
commit 37d87b9006
1 changed files with 4 additions and 2 deletions

6
pkg.c
View File

@ -60,13 +60,15 @@ pkg_traverse(pkg_t *root,
void void
print_cflags(pkg_t *pkg, void *unused) print_cflags(pkg_t *pkg, void *unused)
{ {
printf("%s ", pkg->cflags); if (pkg->cflags != NULL)
printf("%s ", pkg->cflags);
} }
void void
print_libs(pkg_t *pkg, void *unused) print_libs(pkg_t *pkg, void *unused)
{ {
printf("%s ", pkg->libs); if (pkg->libs != NULL)
printf("%s ", pkg->libs);
} }
int main(int argc, const char *argv[]) int main(int argc, const char *argv[])