Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A patch for the Prolific USB serial driver' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A patch for the Prolific USB serial driver
Authored by: david-bo on Sep 25, '03 02:49:17PM

How did you figure out that the cause was a rather obvious programming mistake when all you could see was the binary code?

---
http://www.google.com/search?as_q=%22Authored+by%3A+david-bo%22&num=10&hl=en&ie=ISO-8859-1&btnG=



[ Reply to This | # ]
A patch for the Prolific USB serial driver
Authored by: iDG on Sep 27, '03 07:03:38AM
Well, I thought the error in the code must have been a rather harmless one from start, because the driver did work fine except for the message. Observing the code with otool -V -h i did see what I think is the result of a code like:
if(something()) {
  result=do_stuff()
}
else {
   result=do_other_stuff()
}
return result

Given the obvious outcome of the code, do_other_stuff() either always returned the wrong result, or simply was not designed to return anything useful, and the code should have been:
if(something()) {
  result=do_stuff()
}
else {
   do_other_stuff()
   result=0;
}
return result



[ Reply to This | # ]