Re: [cacard] simpletlv: Slight improvement to API documentation

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

 



On Tue, 2018-08-14 at 14:41 +0200, Christophe Fergeau wrote:
> Document return value of simpletlv_get_length and simpletlv_encode
> and
> fix a few typos.

Sharp eye or good spellchecker. Looks good to me. Ack.

> ---
>  src/simpletlv.h | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/simpletlv.h b/src/simpletlv.h
> index bf785e4..d12f52d 100644
> --- a/src/simpletlv.h
> +++ b/src/simpletlv.h
> @@ -48,9 +48,11 @@ struct simpletlv_member {
>  
>  /*
>   * Calculate expected length of TLV buffer
> - * @param ltv         array of LTV structres to encode
> + * @param ltv         array of TLV structures to encode
>   * @param tlvlen      number of members in the array to encode
>   * @param buffer_type Encode only tags + lengths, values or both
> + * @return            The length of the data in the TLV record,
> + *                    -1 on errors
>   */
>  int
>  simpletlv_get_length(struct simpletlv_member *, size_t,
> @@ -72,12 +74,13 @@ simpletlv_merge(const struct simpletlv_member *a,
> size_t a_len,
>                  const struct simpletlv_member *b, size_t b_len);
>  
>  /*
> - * Encode strucure into SimpleLTV format, TL together with V
> + * Encode structure into SimpleTLV format, TL together with V
>   * @param  tlv       array of TLV structures to encode
>   * @param  tlvlen    number of members in the array to encode
>   * @param  out       Byte array to write into
>   * @param  outlen    The length of output array
>   * @param  ptr       The end of TLV record
> + * @return           The length of the encoded data, -1 on errors
>   */
>  int
>  simpletlv_encode(struct simpletlv_member *tlv, size_t tlv_len,
-- 
Jakub Jelen
Software Engineer
Security Technologies
Red Hat, Inc.

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]