Set 'id' to be its successor stream ID. * If 'id' is the maximal possible id, it is wrapped around to 0-0 and a * C_ERR is returned. */
| 92 | * If 'id' is the maximal possible id, it is wrapped around to 0-0 and a |
| 93 | * C_ERR is returned. */ |
| 94 | int streamIncrID(streamID *id) { |
| 95 | int ret = C_OK; |
| 96 | if (id->seq == UINT64_MAX) { |
| 97 | if (id->ms == UINT64_MAX) { |
| 98 | /* Special case where 'id' is the last possible streamID... */ |
| 99 | id->ms = id->seq = 0; |
| 100 | ret = C_ERR; |
| 101 | } else { |
| 102 | id->ms++; |
| 103 | id->seq = 0; |
| 104 | } |
| 105 | } else { |
| 106 | id->seq++; |
| 107 | } |
| 108 | return ret; |
| 109 | } |
| 110 | |
| 111 | /* Set 'id' to be its predecessor stream ID. |
| 112 | * If 'id' is the minimal possible id, it remains 0-0 and a C_ERR is |
no outgoing calls
no test coverage detected