[haiku-commits] Re: r41321 - haiku/trunk/src/apps/powerstatus

  • From: kallisti5 <kallisti5@xxxxxxxxxxx>
  • To: <haiku-commits@xxxxxxxxxxxxx>
  • Date: Fri, 06 May 2011 11:52:35 -0500

On Fri, 6 May 2011 12:06:58 -0400, Rene Gollent wrote:
On Fri, May 6, 2011 at 6:06 AM, Philippe Houdoin
<philippe.houdoin@xxxxxxxxx> wrote:
But using strncmp() instead of strcmp() will make it totally safe,
which it's not yet.

In this instance it wouldn't matter, since the string he's comparing
to is the empty string, thus strcmp will always break after a single
character comparison. In the general case you're right though.

Hopefully r41343 makes everyone happy :) ACPI does give weird values sometimes.

 -- Alex

Other related posts: