]> git.ipfire.org Git - pakfire.git/commitdiff
dist: Read macros from /
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 24 Mar 2021 14:04:49 +0000 (14:04 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 24 Mar 2021 14:04:49 +0000 (14:04 +0000)
The Pakfire instance might not be populated

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/dist.c

index 9e5e9f6dd86222609758d9eb60a9186894e0071e..49b55afb23426f7db547ed45bc72890c551db5ee 100644 (file)
@@ -54,15 +54,11 @@ PAKFIRE_EXPORT int pakfire_read_makefile(PakfireParser* parser, Pakfire pakfire,
        // XXX set defaults
 
        // Find all macros
-       char* macros = pakfire_make_path(pakfire, PAKFIRE_MACROS_GLOB_PATTERN);
-       if (!macros)
-               goto ERROR;
 
-       DEBUG(pakfire, "Searching for macros in %s\n", macros);
+       DEBUG(pakfire, "Searching for macros in %s\n", PAKFIRE_MACROS_GLOB_PATTERN);
 
        glob_t globmacros;
-       r = glob(macros, 0, NULL, &globmacros);
-       free(macros);
+       r = glob(PAKFIRE_MACROS_GLOB_PATTERN, 0, NULL, &globmacros);
 
        // Handle any errors
        switch (r) {