[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH libguestfs 6/9] fish.c: don't perform arithmetic on void* pointers



On Fri, Aug 21, 2009 at 03:28:16PM +0200, Jim Meyering wrote:
> From: Jim Meyering <meyering redhat com>
> 
> * fish/fish.c (xwrite): Use char*.
> ---
>  fish/fish.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/fish/fish.c b/fish/fish.c
> index fbac519..3acd450 100644
> --- a/fish/fish.c
> +++ b/fish/fish.c
> @@ -1117,9 +1117,10 @@ add_history_line (const char *line)
>  }
> 
>  int
> -xwrite (int fd, const void *buf, size_t len)
> +xwrite (int fd, const void *v_buf, size_t len)
>  {
>    int r;
> +  const char *buf = v_buf;
> 
>    while (len > 0) {
>      r = write (fd, buf, len);
> -- 
> 1.6.4.378.g88f2f

ACK.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 75 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]