Bryce W. Harrington wrote:

+       ret = rpir_surface_set_opaque_rect(surface, update);
+       if (ret < 0)

Other code here is just checking "if (ret)".
rpir_surface_set_opaque_rect() only appears to return 0 or -1, so might
be more consistent with existing code to do the same.  Or do you
invision that routine could return a positive integer which would not
cause it to error out here?

I think it is pretty common to have functions that return 0 on error and non-zero on success. Therefore a test of "if (ret)" may be mis-read as an accidental reversal of the error test.

Returning negative on error is also common, so "if (ret<0)" will not be mis-read.
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to