diff options
author | Simon Glass | 2020-02-03 07:36:02 -0700 |
---|---|---|
committer | Simon Glass | 2020-02-05 19:33:46 -0700 |
commit | 0db1b4305ad5ba8ef9c41d2f07697c77a04787e2 (patch) | |
tree | eb3d8985ed675c8ee220d4b001c43215575b44f2 /arch/sandbox/cpu/eth-raw-os.c | |
parent | f72bdc60b230f5e5d77eaad0b2defe07a46c02a9 (diff) |
sandbox: Drop use of special os_malloc() where possible
Some sandbox files are not built with U-Boot headers, so with the renamed
malloc functions there is now no need to use the special os_... allocation
functions to access the system routines. Instead we can just call them
directly.
Update the affected files accordingly.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/cpu/eth-raw-os.c')
-rw-r--r-- | arch/sandbox/cpu/eth-raw-os.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sandbox/cpu/eth-raw-os.c b/arch/sandbox/cpu/eth-raw-os.c index 8d05bc2eda0..da01d1addf9 100644 --- a/arch/sandbox/cpu/eth-raw-os.c +++ b/arch/sandbox/cpu/eth-raw-os.c @@ -74,7 +74,7 @@ static int _raw_packet_start(struct eth_sandbox_raw_priv *priv, /* Prepare device struct */ priv->local_bind_sd = -1; - priv->device = os_malloc(sizeof(struct sockaddr_ll)); + priv->device = malloc(sizeof(struct sockaddr_ll)); if (priv->device == NULL) return -ENOMEM; device = priv->device; @@ -147,7 +147,7 @@ static int _local_inet_start(struct eth_sandbox_raw_priv *priv) /* Prepare device struct */ priv->local_bind_sd = -1; priv->local_bind_udp_port = 0; - priv->device = os_malloc(sizeof(struct sockaddr_in)); + priv->device = malloc(sizeof(struct sockaddr_in)); if (priv->device == NULL) return -ENOMEM; device = priv->device; @@ -282,7 +282,7 @@ int sandbox_eth_raw_os_recv(void *packet, int *length, void sandbox_eth_raw_os_stop(struct eth_sandbox_raw_priv *priv) { - os_free(priv->device); + free(priv->device); priv->device = NULL; close(priv->sd); priv->sd = -1; |