Pierre Habouzit, Sat, Oct 13, 2007 15:29:03 +0200:"const struct option *opt"? You never modify the struct option itself, only the values under the pointers it contains. Using const here will allow the compiler to reuse string constants (not that there will be much of the opportunity, but anyway) in the option arrays. "const struct option *opt"? "const struct option *options"? "const struct option *options"? "const struct option *opts"? Why not "const char *const *usagestr"? Especially if you change "usagestr" (the pointer itself) later. "[]" is sometimes a hint that the pointer itself should not be changed, being an array. And you want make opts const. BTW, it does not "make" usage. It calls the usage() or prints a usage description. "make" implies it creates the "usage", which according to the prototype is later nowhere to be found. This will crash for empty usagestr, like "{ NULL }". Was it deliberately? (I'd make it deliberately, if I were you. I'd even used cnt of opts, to force people to document all options). ... BTW, if you just printed the usage message out (it is about usage of a program, isn't it?) and called exit() everyone would be just as happy. And you wouldn't have to include strbuf (it is the only use of it), less code, too. It'd make simplier to stea^Wcopy your implementation, which I like :) - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| James Bottomley | Breakage caused by unreviewed patch in x86 tree |
| Andrew Morton | Re: POHMELFS high performance network filesystem. Transactions, failover, performa... |
| Randy Dunlap | Re: 2.6.25-rc5-mm1 (paravirt/vsmp/no PCI) |
| Arnd Hannemann | 2.6.24-rc8 hangs at mfgpt-timer |
| Theodore Ts'o | Re: SVGA-alphanum. modes |
| Joseph R. Pannon | More install questions |
| Paul Richards | Header files |
| Les Andrzejewski | X386/WD90C31/SUMSUNG SYNC MASTER 4 |
git: | |
| David Miller | Re: [BUG] New Kernel Bugs |
| David Miller | Re: iptables very slow after commit784544739a25c30637397ace5489eeb6e15d7d49 |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
