At Thu, 03 May 2012 10:25:07 +0800, Liu Yuan wrote: > > On 05/03/2012 05:56 AM, Shevek wrote: > > > This makes calls to node_cmp() == 0 typesafe under C99. > > > > I wanted to write this for a while. Now I finally did it. > > > > S. > > > > > I'd suggest we'd better directly code node_cmp() typesafe rather than > write a wrapper on top of it. I like the idea let node_cmp() return 1 node_cmp() is also used for qsort()/bsearch(), so we cannot change its arguments or return value. I think this patch looks okay if it is against the current git master. > for equality to eliminate '== 0', so I'd suggest a name as node_equal(), > which returns 1 for equality. > > As other commented, you'd better use git format to generate the patch > and mail it as the text body. We should document the rule. I've added it to Sheepdog wiki: https://github.com/collie/sheepdog/wiki/Submit-a-patch Thanks, Kazutaka |