]> git.ozlabs.org Git - petitboot/blobdiff - discover/pxe-parser.c
Various fixups and checks to make scan-build happy
[petitboot] / discover / pxe-parser.c
index 9221f95ae07744cb5cd136ed0187c429cc413f8a..035794cd8a6416362cf20fb0a255bed9ac6ac851 100644 (file)
@@ -292,9 +292,14 @@ static bool ipxe_simple_parser(struct conf_context *ctx, char *buf, int len)
                        continue;
                }
 
+               if (!name) {
+                       pb_debug_fn("missing name from conf_get_pair\n");
+                       continue;
+               }
+
                /* All other parameters require a value */
                if (!value) {
-                       pb_debug("%s: '%s' missing value\n", __func__, name);
+                       pb_debug_fn("'%s' missing value\n", name);
                        continue;
                }
 
@@ -500,7 +505,7 @@ static int pxe_parse(struct discover_context *dc)
                        file_url = dc->conf_url;
 
                if (!file_url) {
-                       pb_log("%s: Failed to parse conf url!\n", __func__);
+                       pb_log_fn("Failed to parse conf url!\n");
                        goto out_conf;
                }