| 147 | */ |
| 148 | |
| 149 | static void |
| 150 | msgbuf_do_addchar(struct msgbuf * const mbp, u_int * const seq, const int c) |
| 151 | { |
| 152 | u_int pos; |
| 153 | |
| 154 | /* Make sure we properly wrap the sequence number. */ |
| 155 | pos = MSGBUF_SEQ_TO_POS(mbp, *seq); |
| 156 | mbp->msg_cksum += (u_int)(u_char)c - |
| 157 | (u_int)(u_char)mbp->msg_ptr[pos]; |
| 158 | mbp->msg_ptr[pos] = c; |
| 159 | *seq = MSGBUF_SEQNORM(mbp, *seq + 1); |
| 160 | } |
| 161 | |
| 162 | /* |
| 163 | * Append a character to a message buffer. |
no outgoing calls
no test coverage detected