]> git.proxmox.com Git - qemu.git/blobdiff - device_tree.c
vl: Tighten parsing of -machine option phandle_start
[qemu.git] / device_tree.c
index 0e7fe2dda66accff47890bf4a0abd63d1f17db78..10cf3d0b60c2f9e9d0f82417d4a64c8933cc39f7 100644 (file)
@@ -240,11 +240,8 @@ uint32_t qemu_devtree_alloc_phandle(void *fdt)
      * which phandle id to start allocting phandles.
      */
     if (!phandle) {
-        const char *phandle_start = qemu_opt_get(qemu_get_machine_opts(),
-                                                 "phandle_start");
-        if (phandle_start) {
-            phandle = strtoul(phandle_start, NULL, 0);
-        }
+        phandle = qemu_opt_get_number(qemu_get_machine_opts(),
+                                      "phandle_start", 0);
     }
 
     if (!phandle) {