[vlc-devel] [vlc-commits] hls: Avoid using errno.

Rémi Denis-Courmont remi at remlab.net
Mon Mar 12 13:21:04 CET 2012


On Fri,  9 Mar 2012 16:37:41 +0100 (CET), git at videolan.org (Hugo
Beauzée-Luyssen) wrote:
> vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Fri
Mar
> 9 16:34:59 2012 +0100| [7eb141b4800273870a95210a98c6464416a3b041] |
> committer: Hugo Beauzée-Luyssen
> 
> hls: Avoid using errno.
> 
>>
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7eb141b4800273870a95210a98c6464416a3b041
> ---
> 
>  modules/stream_filter/httplive.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/modules/stream_filter/httplive.c
> b/modules/stream_filter/httplive.c
> index f13c568..f9eba12 100644
> --- a/modules/stream_filter/httplive.c
> +++ b/modules/stream_filter/httplive.c
> @@ -574,10 +574,11 @@ static int parse_SegmentInformation(hls_stream_t
> *hls, char *p_read, int *durati
>          return VLC_EGENERIC;
>  
>      int value;
> +    char *endptr;
>      if (hls->version < 3)
>      {
> -       value = strtol(token, NULL, 10);
> -       if (errno == ERANGE)
> +       value = strtol(token, &endptr, 10);
> +       if (token == endptr)

This does not look correct to me.

-- 
Rémi Denis-Courmont
Sent from my collocated server



More information about the vlc-devel mailing list