lkml.org 
[lkml]   [2013]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Re: [PATCH 2/5] perf: Reorder parameters of strglobmatch
(2013/05/21 18:19), Arnaldo Carvalho de Melo wrote:
> Em Fri, May 17, 2013 at 11:21:11AM +0900, Masami Hiramatsu escreveu:
>> (2013/05/16 23:55), Steven Rostedt wrote:
>>> I'm a bit confused to the rational here. Can you explain in more detail
>>> to why this patch is actually needed?
>
>> Yes, actually, this patch is not needed from the viewpoint of execution,
>> but less misuse for future use of the strglobmatch, I think.
>
>> For example, glob(3) has the pattern parameter as the first one,
>>
>> int glob(const char *pattern, int flags,
>> int (*errfunc) (const char *epath, int eerrno),
>> glob_t *pglob);
>
>> regexec(3) also has the compiled regexp at the first parameter,
>
>> int regexec(const regex_t *preg, const char *string, size_t nmatch,
>> regmatch_t pmatch[], int eflags);
>
>> Thus, I think a new user of strglobmatch() may guess that the first
>> parameter should be the glob pattern.
>
>> So, this patch is not technically needed, but from the viewpoint of coding
>> naturally, it should be changed, IMHO.
>
> So I suggest you state this in the changeset comment :-)

Agreed, I must update it ...

Thank you,
--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com




\
 
 \ /
  Last update: 2013-05-21 12:21    [W:0.059 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site