[ros-bugs] [Bug 5611] PATCH: sc: Prevent crash command-line Service Control due to missing arguments

ReactOS.Bugzilla at reactos.org ReactOS.Bugzilla at reactos.org
Thu Sep 16 09:52:00 UTC 2010


http://www.reactos.org/bugzilla/show_bug.cgi?id=5611





--- Comment #4 from RoMe <roelmessiant at gmail.com>  2010-09-16 09:51:59 CET ---
Interesting points. I chose for the incrementing way because the rest of the
source files also show that behaviour. No real reason to do it differently
here.

The zero-indexing is done for clarity when looking at the one-indexing a few
lines later (and it also dramatically cuts down on the line count by consuming
2 tokens at once at the bottom, instead of one at a time and always
dereferencing).

if (!lstrcmpi(ServiceArgs[0], ..)) .. = ServiceArgs[1];
if (!lstrcmpi(*ServiceArgs, ..)) .. = ServiceArgs[1];

The top one looks "cleaner" to me .. and for the compiler it's all the same,
indexing here is syntactic sugar anyway.


-- 
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Ros-bugs mailing list