diff mbox

[7/7] sheepdog: remove useless casts

Message ID 1466007277-17525-8-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: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
CC: qemu-block@nongnu.org
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
 block/sheepdog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Hitoshi Mitake June 17, 2016, 3:23 a.m. UTC | #1
At Wed, 15 Jun 2016 18:14:37 +0200,
Laurent Vivier wrote:
> 
> This patch is the result of coccinelle script
> scripts/coccinelle/typecast.cocci
> 
> CC: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
> CC: qemu-block@nongnu.org
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>  block/sheepdog.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>

Thanks,
Hitoshi

> 
> diff --git a/block/sheepdog.c b/block/sheepdog.c
> index 23fbace..95e6a11 100644
> --- a/block/sheepdog.c
> +++ b/block/sheepdog.c
> @@ -1049,7 +1049,7 @@ static int parse_vdiname(BDRVSheepdogState *s, const char *filename,
>      const char *host_spec, *vdi_spec;
>      int nr_sep, ret;
>  
> -    strstart(filename, "sheepdog:", (const char **)&filename);
> +    strstart(filename, "sheepdog:", &filename);
>      p = q = g_strdup(filename);
>  
>      /* count the number of separators */
> @@ -2652,7 +2652,7 @@ static int sd_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_tab)
>      req.opcode = SD_OP_READ_VDIS;
>      req.data_length = max;
>  
> -    ret = do_req(fd, s->aio_context, (SheepdogReq *)&req,
> +    ret = do_req(fd, s->aio_context, &req,
>                   vdi_inuse, &wlen, &rlen);
>  
>      closesocket(fd);
> -- 
> 2.5.5
> 
>
diff mbox

Patch

diff --git a/block/sheepdog.c b/block/sheepdog.c
index 23fbace..95e6a11 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -1049,7 +1049,7 @@  static int parse_vdiname(BDRVSheepdogState *s, const char *filename,
     const char *host_spec, *vdi_spec;
     int nr_sep, ret;
 
-    strstart(filename, "sheepdog:", (const char **)&filename);
+    strstart(filename, "sheepdog:", &filename);
     p = q = g_strdup(filename);
 
     /* count the number of separators */
@@ -2652,7 +2652,7 @@  static int sd_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_tab)
     req.opcode = SD_OP_READ_VDIS;
     req.data_length = max;
 
-    ret = do_req(fd, s->aio_context, (SheepdogReq *)&req,
+    ret = do_req(fd, s->aio_context, &req,
                  vdi_inuse, &wlen, &rlen);
 
     closesocket(fd);