Coding Style and Conventions - couchbase/sync_gateway GitHub Wiki

Conventions

  • Use 0 to mean zero, and -1 to mean disabled/undefined/unknown/not applicable.

    Example: if foo_delay == 0 { // queuing disabled becomes if foo_delay < 0 { // queuing disabled. This allows 0 to mean queue, but without adding any additional delay.