Hi,

On Sat, Jul 7, 2012 at 1:47 PM, Måns Rullgård <[email protected]> wrote:
> "Ronald S. Bultje" <[email protected]> wrote:
>>On Sat, Jul 7, 2012 at 11:03 AM, Anton Khirnov <[email protected]>
>>wrote:
>>> -    while ((c = getopt(argc, argv, "hi:o:")) != -1) {
>>> -        switch (c) {
>>> -        case 'h':
>>> +    while (optindex < argc) {
>>> +        char *opt = argv[optindex++];
>>> +
>>> +        if (!opt[0]) {
>>
>>Can that trigger? I don't think this ever will, will it?
>
> Of course it can. A program argument can be an empty string.

So merge it with the case then:

If (opt[0] == '-') opt++;
switch (*opt) {
default:
    usage();
    return 1;
}

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

Reply via email to