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

  • From: Rene Gollent <anevilyak@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 6 May 2011 12:06:58 -0400

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.

Regards,

Rene

Other related posts: