Re: [PATCH 1/1] seq: arecordmidi: Add num-events option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Takashi,

On Mon, Jan 28, 2019 at 7:36 PM Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx>
wrote:

> Hi,
>
> On 2019/01/29 10:44, pmalani@xxxxxxxxxxxx wrote:
> > @@ -775,6 +780,11 @@ int main(int argc, char *argv[])
> > +             case 'n':
> > +                     num_events = atoi(optarg);
> > +                     if (num_events <= 0)
> > +                             fatal("num_events must be greater than 0");
> > +                     break;
>
> We cannot distinguish two cases; 0 is given and including non-numeraical
> characters. Please use strtol() or so and check return value and errno
> for safe.
>
> For your information:
>
> http://git.alsa-project.org/?p=alsa-utils.git;a=blob;f=axfer/main.c;hb=HEAD#l44

Can I duplicate this in arecordmidi.c ? I'm loath to introduce a header,
and then refactor axfer/main.c.

>
>
>
> Regards
>
> Takashi Sakamoto
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux