Re: [PATCH obexd 6/7] filesystem: Use proper pointer type instead of void* in string_read

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

 



Hi Szymon,

On Wed, Jun 13, 2012 at 11:49 PM, Szymon Janc <szymon@xxxxxxxxxxx> wrote:
> ---
>  plugins/filesystem.c |    3 +--
>  plugins/filesystem.h |    2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/plugins/filesystem.c b/plugins/filesystem.c
> index e664fc5..d1a3df4 100644
> --- a/plugins/filesystem.c
> +++ b/plugins/filesystem.c
> @@ -594,9 +594,8 @@ static int string_free(void *object)
>        return 0;
>  }
>
> -ssize_t string_read(void *object, void *buf, size_t count)
> +ssize_t string_read(GString *string, void *buf, size_t count)
>  {
> -       GString *string = object;
>        ssize_t len;
>
>        if (string->len == 0)
> diff --git a/plugins/filesystem.h b/plugins/filesystem.h
> index f95773b..694a350 100644
> --- a/plugins/filesystem.h
> +++ b/plugins/filesystem.h
> @@ -21,6 +21,6 @@
>  *
>  */
>
> -ssize_t string_read(void *object, void *buf, size_t count);
> +ssize_t string_read(GString *string, void *buf, size_t count);
>  gboolean is_filename(const char *name);
>  int verify_path(const char *path);
> --
> 1.7.10.4

Nak, the idea is to match the parameters of mimetype driver read
callback, so you don't have to cast.


-- 
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux