diff mbox

[5/7] fw_cfg: remove useless casts

Message ID 1466007277-17525-6-git-send-email-lvivier@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Laurent Vivier June 15, 2016, 4:14 p.m. UTC
This patch is the result of coccinelle script
scripts/coccinelle/typecast.cocci

CC: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
 hw/nvram/fw_cfg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Laszlo Ersek June 15, 2016, 4:34 p.m. UTC | #1
On 06/15/16 18:14, Laurent Vivier wrote:
> This patch is the result of coccinelle script
> scripts/coccinelle/typecast.cocci
> 
> CC: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>  hw/nvram/fw_cfg.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
> index 74a0079..9d84129 100644
> --- a/hw/nvram/fw_cfg.c
> +++ b/hw/nvram/fw_cfg.c
> @@ -180,7 +180,7 @@ static void fw_cfg_bootsplash(FWCfgState *s)
>          temp = qemu_opt_get(opts, "splash-time");
>          if (temp != NULL) {
>              p = (char *)temp;
> -            boot_splash_time = strtol(p, (char **)&p, 10);
> +            boot_splash_time = strtol(p, &p, 10);
>          }
>      }
>  
> @@ -240,7 +240,7 @@ static void fw_cfg_reboot(FWCfgState *s)
>          temp = qemu_opt_get(opts, "reboot-timeout");
>          if (temp != NULL) {
>              p = (char *)temp;
> -            reboot_timeout = strtol(p, (char **)&p, 10);
> +            reboot_timeout = strtol(p, &p, 10);
>          }
>      }
>      /* validate the input */
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
diff mbox

Patch

diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index 74a0079..9d84129 100644
--- a/hw/nvram/fw_cfg.c
+++ b/hw/nvram/fw_cfg.c
@@ -180,7 +180,7 @@  static void fw_cfg_bootsplash(FWCfgState *s)
         temp = qemu_opt_get(opts, "splash-time");
         if (temp != NULL) {
             p = (char *)temp;
-            boot_splash_time = strtol(p, (char **)&p, 10);
+            boot_splash_time = strtol(p, &p, 10);
         }
     }
 
@@ -240,7 +240,7 @@  static void fw_cfg_reboot(FWCfgState *s)
         temp = qemu_opt_get(opts, "reboot-timeout");
         if (temp != NULL) {
             p = (char *)temp;
-            reboot_timeout = strtol(p, (char **)&p, 10);
+            reboot_timeout = strtol(p, &p, 10);
         }
     }
     /* validate the input */