|
From: Sean M. <se...@ro...> - 2013-08-01 16:00:45
|
On Thu, 1 Aug 2013 06:28:27 +0200, Ludovic Rousseau said: >I still have 2 commits from Sean in my Xcode branch: > >- Core: defensive programming >https://github.com/LudovicRousseau/libusbx/commit/ >5da4949cffacf1a19aeaf62ce796019daa50c49d >Not Xcode related. Maybe we can drop it. Why drop it? The comments do not match the implementation. Comments: "[return] the index of the configuration matching a specific bConfigurationValue in the idx output parameter, or -1 if the config was not found" There is a code path where idx is never touched. Perhaps clients of the function are careful to only read idx if the return value is success, but also setting idx to -1 is much safer. Cheers, -- ____________________________________________________________ Sean McBride, B. Eng se...@ro... Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada |