[haiku-commits] Re: haiku: hrev48946 - src/system/kernel/fs

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 29 Mar 2015 22:12:28 +0200

Am 28/03/2015 um 12:20 schrieb mmlr@xxxxxxxx:
3384ca1a7b85: rootfs: Fix wrong comparison for buffer reuse on rename.

Nice catch!

        // we try to reuse the existing name buffer if possible
-       if (strlen(fromName) >= strlen(toName)) {
+       if (strlen(fromName) < strlen(toName)) {

I'd say this is a very questionable optimization to begin with.

Bye,
   Axel.

Other related posts: