[MPlayer-dev-eng] Re: [PATCH] one input key more commands

Ötvös Attila oattila at chello.hu
Sun Apr 1 11:48:59 CEST 2007


2007. április 1. 01.00 dátummal Alban Bedel ezt írta:
> On Sat, 31 Mar 2007 19:35:24 +0200
>
> > +  if (NULL==(bind_section=mp_input_get_bind_section(section))) {
> > +    mp_msg(MSGT_INPUT,MSGL_INFO,"Bind section alloc error.\n");
> > +    return;
> > +    }
>
> Imho those kind of test are useless, if we can't allocate a couple bytes
> on a modern OS, then the system will be so hoosed that a sig11 is just
> as good.

I removed.
>
> +void
> +mp_input_set_section(char *name)
> +{
> +if(section) free(section);
> +if(name) section=strdup(name); else section=NULL;
> +}
> +
> Same here using the style from the rest of the file would be better.
> Also why not directly lookup the bind section here instead of doing it
> at every keypress ?

I repaired.

> > +struct mp_cmd_bind_section_st {
> > +  mp_cmd_bind_t* cmd_binds;
> > +  char* section;
> > +  mp_cmd_bind_section_t* next;
> > +};
>
> [...]
>
> > +  mp_cmd_bind_t* binds;
>
> [...]
>
> > +  while (!cmd_binds_section) {
>
> You meant while(cmd_binds_section) I suppose.
I repaired.

> > +    mp_input_free_binds(cmd_binds_section->cmd_binds);
> > +    free(cmd_binds_section->section);
> > +    binds=cmd_binds_section->next;
>
> Wrong pointer type! Sure a pointer is a pointer but no need to add
> useless warnings.

I repaired.

Best regards!
Attila
-------------- next part --------------
A non-text attachment was scrubbed...
Name: input-section-4-identation.patch
Type: text/x-diff
Size: 5731 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070401/fddb77e5/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: input-section.patch
Type: text/x-diff
Size: 5649 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070401/fddb77e5/attachment-0001.patch>


More information about the MPlayer-dev-eng mailing list