[haiku-commits] Re: haiku: hrev50447 - src/apps/packageinstaller

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 23 Jul 2016 10:48:33 -0400

On Sat, Jul 23, 2016 at 10:45 AM, Rene Gollent <anevilyak@xxxxxxxxx> wrote:

This actually doesn't work at all the way the comment above it
suggests. 1) strcmp returns 0 in the case of a match, which the if
condition does not take into account, and 2) strcmp cannot be used to
perform a partial/prefix match of this nature, since it attempts to
compare the two strings in their entirety, ergo even if the return
value was correctly taken into account, this would only actually work
if the path variable in question is "/boot/" with no other content. As
such, if this code in fact works, it's doing so purely by luck rather
than by design.

Yes, I realized that shortly after pushing. Oh well, that's what I get
for committing before I'm fully awake.

Thanks for pointing it out.
-waddlesplash

Other related posts: