]> git.ozlabs.org Git - petitboot/blobdiff - discover/pxe-parser.c
ui/ncurses/nc-config: Add validation for network settings
[petitboot] / discover / pxe-parser.c
index bc07a13c54b1ff8eb9884fe30de5977b1d04e881..2fc261ba9a9089bf3a7841bf10077842829d2acc 100644 (file)
@@ -1,5 +1,7 @@
 
-#define _GNU_SOURCE
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
+#endif
 #include <string.h>
 
 #include <talloc/talloc.h>
@@ -132,6 +134,8 @@ static int pxe_parse(struct discover_context *dc)
                if (!pxe_conf_files)
                        goto out_conf;
 
+               rc = -1;
+
                for (filename = pxe_conf_files; *filename; filename++) {
                        url = pb_url_join(dc, conf_url, *filename);
                        if (!url)