[FFmpeg-devel] [PATCH 5/6] ffprobe: remove pointless zero assignations.

Stefano Sabatini stefano.sabatini-lala at poste.it
Wed Aug 17 23:24:22 CEST 2011


On date Wednesday 2011-08-17 20:32:06 +0200, Clément Bœsch encoded:
> ---
>  ffprobe.c |   16 ++++++++--------
>  1 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/ffprobe.c b/ffprobe.c
> index 1f01a88..876cc5e 100644
> --- a/ffprobe.c
> +++ b/ffprobe.c
> @@ -32,22 +32,22 @@
>  const char program_name[] = "ffprobe";
>  const int program_birth_year = 2007;
>  
> -static int do_show_format  = 0;
> -static int do_show_packets = 0;
> -static int do_show_streams = 0;
> +static int do_show_format;
> +static int do_show_packets;
> +static int do_show_streams;
>  
>  static int json_output;
> -static int show_value_unit              = 0;
> -static int use_value_prefix             = 0;
> -static int use_byte_value_binary_prefix = 0;
> -static int use_value_sexagesimal_format = 0;
> +static int show_value_unit;
> +static int use_value_prefix;
> +static int use_byte_value_binary_prefix;
> +static int use_value_sexagesimal_format;
>  
>  /* globals */
>  static const OptionDef options[];
>  
>  /* FFprobe context */
>  static const char *input_filename;
> -static AVInputFormat *iformat = NULL;
> +static AVInputFormat *iformat;
>  
>  static const char *binary_unit_prefixes [] = { "", "Ki", "Mi", "Gi", "Ti", "Pi" };
>  static const char *decimal_unit_prefixes[] = { "", "K" , "M" , "G" , "T" , "P"  };

Well whatever, I have a preference for explicit initialization though,
as the reader may not be aware of static initialization rules.
-- 
FFmpeg = Fundamentalist & Forgiving Mind-dumbing Peaceless Erudite Gorilla


More information about the ffmpeg-devel mailing list