[Ffmpeg-cvslog] r8724 - trunk/cmdutils.c

Rich Felker dalias
Fri Apr 13 15:25:42 CEST 2007


On Fri, Apr 13, 2007 at 09:19:12AM +0200, benoit wrote:
> Author: benoit
> Date: Fri Apr 13 09:19:12 2007
> New Revision: 8724
> 
> Modified:
>    trunk/cmdutils.c
> 
> Log:
> 
> change atoll call to equivalent strtoll to fix compilation on Mac OS X 10.2
> patch by Patrice Bensoussan \ patrice dot bensoussan chez free dot fr
> Original thread:
> date: 04/05/2007 07:56 PM
> subject: [Ffmpeg-devel] [PATCH] Fix broken compilation on Mac OS X 10.2 due to OPT_INT64 support
> 
> 
> 
> Modified: trunk/cmdutils.c
> ==============================================================================
> --- trunk/cmdutils.c	(original)
> +++ trunk/cmdutils.c	Fri Apr 13 09:19:12 2007
> @@ -99,7 +99,7 @@ unknown_opt:
>              } else if (po->flags & OPT_INT) {
>                  *po->u.int_arg = atoi(arg);
>              } else if (po->flags & OPT_INT64) {
> -                *po->u.int64_arg = atoll(arg);
> +                *po->u.int64_arg = strtoll(arg, (char **)NULL, 10);

Cast to (char **) is useless and ugly. NULL or 0 (NULL is more
informative though) would work just as well. This is not C++.

Rich




More information about the ffmpeg-cvslog mailing list