[haiku-commits] Re: haiku: hrev43975 - src/apps/deskbar

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 11 Apr 2012 16:28:37 +0200

On 08.04.2012 03:33, jscipione@xxxxxxxxx wrote:
8ff49ae: Use != B_OK, not<  B_OK to indicate an error.
   Apparently error codes are allowed to be positive.

No, error codes are negative on Haiku; for example, the ssize_t type makes this mandatory. When the type is status_t, however, you should not assume anything about the sign of an error code; for all we know, a status_t should never be positive, so an error check like this may hide a potential programming error.

Anyway, the != B_OK of the second line of the if-clauses should be indented one tab further; at least our current practice is to only indent the logical and/or operators on the same level as the if.

Bye,
   Axel.

Other related posts: