Merge tag 'efi-2022-07-rc4-4' of https://source.denx.de/u-boot/custodians/u-boot-efi
[platform/kernel/u-boot.git] / cmd / rng.c
index 36ca7a1..1ad5a09 100644 (file)
--- a/cmd/rng.c
+++ b/cmd/rng.c
@@ -8,9 +8,10 @@
 #include <command.h>
 #include <dm.h>
 #include <hexdump.h>
+#include <malloc.h>
 #include <rng.h>
 
-static int do_rng(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_rng(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
        size_t n = 0x40;
        struct udevice *dev;
@@ -23,7 +24,7 @@ static int do_rng(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        }
 
        if (argc >= 2)
-               n = simple_strtoul(argv[1], NULL, 16);
+               n = hextoul(argv[1], NULL);
 
        buf = malloc(n);
        if (!buf) {