[alsa-devel] [PATCH v6 2/2] amidi: use GNU getopt_long() proper argument names
Felipe Ferreri Tonello
eu at felipetonello.com
Tue Aug 30 12:18:10 CEST 2016
Hi Takashi,
On 30/08/16 00:22, Takashi Sakamoto wrote:
> On Aug 23 2016 23:09, Felipe F. Tonello wrote:
>> This has no affect besides more clarity to the code.
>>
>> Signed-off-by: Felipe F. Tonello <eu at felipetonello.com>
>> ---
>> amidi/amidi.c | 26 +++++++++++++-------------
>> 1 file changed, 13 insertions(+), 13 deletions(-)
>>
>> diff --git a/amidi/amidi.c b/amidi/amidi.c
>> index d0dbb322f80a..088da56e2139 100644
>> --- a/amidi/amidi.c
>> +++ b/amidi/amidi.c
>> @@ -415,19 +415,19 @@ int main(int argc, char *argv[])
>> {
>> static const char short_options[] = "hVlLp:s:r:S::dt:acD:";
>> static const struct option long_options[] = {
>> - {"help", 0, NULL, 'h'},
>> - {"version", 0, NULL, 'V'},
>> - {"list-devices", 0, NULL, 'l'},
>> - {"list-rawmidis", 0, NULL, 'L'},
>> - {"port", 1, NULL, 'p'},
>> - {"send", 1, NULL, 's'},
>> - {"receive", 1, NULL, 'r'},
>> - {"send-hex", 2, NULL, 'S'},
>> - {"dump", 0, NULL, 'd'},
>> - {"timeout", 1, NULL, 't'},
>> - {"active-sensing", 0, NULL, 'a'},
>> - {"clock", 0, NULL, 'c'},
>> - {"delay", 1, NULL, 'D'},
>> + {"help", no_argument, NULL, 'h'},
>> + {"version", no_argument, NULL, 'V'},
>> + {"list-devices", no_argument, NULL, 'l'},
>> + {"list-rawmidis", no_argument, NULL, 'L'},
>> + {"port", required_argument, NULL, 'p'},
>> + {"send", required_argument, NULL, 's'},
>> + {"receive", required_argument, NULL, 'r'},
>> + {"send-hex", optional_argument, NULL, 'S'},
>> + {"dump", no_argument, NULL, 'd'},
>> + {"timeout", required_argument, NULL, 't'},
>> + {"active-sensing", no_argument, NULL, 'a'},
>> + {"clock", no_argument, NULL, 'c'},
>> + {"delay", required_argument, NULL, 'D'},
>> { }
>> };
>> int c, err, ok = 0;
>
> This patch should be posted separately from this patchset, because it's
> just for code improvement regardless of your new feature. This patch
> might be independently merged without long discussions.
Ok.
--
Felipe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x92698E6A.asc
Type: application/pgp-keys
Size: 7177 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20160830/b3f82450/attachment.bin>
More information about the Alsa-devel
mailing list