On Fri, Dec 30, 2011 at 11:06:44AM +0530, Aneesh Dogra wrote:
> 
> --- a/cmdutils.c
> +++ b/cmdutils.c
> @@ -243,13 +247,14 @@ unknown_opt:
>  
>      /* new-style options contain an offset into optctx, old-style address of
>       * a global var*/
> -    dst = po->flags & (OPT_OFFSET|OPT_SPEC) ? (uint8_t*)optctx + po->u.off : 
> po->u.dst_ptr;
> +   dst = po->flags & (OPT_OFFSET | OPT_SPEC) ? (uint8_t *)optctx + po->u.off
> +                                             : po->u.dst_ptr;

I could point out your mistake here, but is is something you should notice
yourself while you review the diff of your changes before sending and the
point of this exercise is teaching you.  So go ahead and stare until you
spot the mistake.

> @@ -258,19 +263,19 @@ unknown_opt:
> -        *(double*)dst = parse_number_or_die(opt, arg, OPT_DOUBLE, -INFINITY, 
> INFINITY);
> +        *(double *)dst = parse_number_or_die(opt, arg, OPT_DOUBLE, 
> -INFINITY, INFINITY);
>      } else if (po->u.func_arg) {
>          int ret = po->flags & OPT_FUNC2 ? po->u.func2_arg(optctx, opt, arg) :
>                                            po->u.func_arg(opt, arg);

Move the ':' to the previous line while you're at it.

> @@ -584,34 +590,34 @@ void show_formats(void)
> +    last_name = "000";
> +    for (;;) {
> +        int decode = 0;
> +        int encode = 0;
> +        const char *name = NULL;
> +        const char *long_name = NULL;

There's one more = that could be aligned here.

> @@ -638,30 +644,32 @@ void show_codecs(void)
>          " .....T = Supports weird frame truncation\n"
>          " ------\n");
>      last_name= "000";
> -    for(;;){
> -        int decode=0;
> -        int encode=0;
> -        int cap=0;
> +    for (;;) {
> +        int decode = 0;
> +        int encode = 0;
> +        int cap = 0;
>          const char *type_str;

and here

> @@ -685,8 +693,8 @@ void show_codecs(void)
>              cap & CODEC_CAP_TRUNCATED ? "T":" ",
>              p2->name,
>              p2->long_name ? p2->long_name : "");
> -       /* if(p2->decoder && decode==0)
> -            printf(" use %s for decoding", p2->decoder->name);*/
> +         /* if (p2->decoder && decode == 0)
> +            printf(" use %s for decoding", p2->decoder->name);*/
>          printf("\n");
>      }
>      printf("\n");

This is ugly, replace the comment markers by '#if 0' instead.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to