On 08/ 8/14 07:30 AM, Matthieu Herrb wrote:
On 08/08/2014 04:51 AM, Alan Coopersmith wrote:
Signed-off-by: Alan Coopersmith <[email protected]>
Hi,
Here it seems to me that strcmp() would be safe. While it changes the behaviour
a bit, it seems more logical to only accept exact matches on the options (and
not anything with random suffixes after the initial option name).
I'd not considered changing the behavior, but I've also never really liked this
pattern of accepting substrings and hoping no one needs an option that overlaps
in the future. (You'll note when I added "-version" I made it a full match, so
no one could write scripts expecting "-ver" to work and then break if "-verbose"
is ever added.)
Moreover I got bored by the useless micro-optimisations of the option parser and
removed them.
What do you think of the attached patch instead?
Works for me, and no one else seems to be complaining about it.
Reviewed-by: Alan Coopersmith <[email protected]>
--
-Alan Coopersmith- [email protected]
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel