- if (reg->messages > 255)
- snprintf(msgstatus, sizeof(msgstatus), " with %d new and %d old messages waiting", reg->messages & 0xff, reg->messages >> 8);
- else if (reg->messages > 1)
- snprintf(msgstatus, sizeof(msgstatus), " with %d new messages waiting\n", reg->messages);
- else if (reg->messages > 0)
- ast_copy_string(msgstatus, " with 1 new message waiting\n", sizeof(msgstatus));
- else
- ast_copy_string(msgstatus, " with no messages waiting\n", sizeof(msgstatus));
- snprintf(ourip, sizeof(ourip), "%s:%d", ast_inet_ntoa(reg->us.sin_addr), ntohs(reg->us.sin_port));
+ if (reg->messages > 255) {
+ snprintf(msgstatus, sizeof(msgstatus), " with %d new and %d old messages waiting", reg->messages & 0xff, reg->messages >> 8);
+ } else if (reg->messages > 1) {
+ snprintf(msgstatus, sizeof(msgstatus), " with %d new messages waiting", reg->messages);
+ } else if (reg->messages > 0) {
+ ast_copy_string(msgstatus, " with 1 new message waiting", sizeof(msgstatus));
+ } else {
+ ast_copy_string(msgstatus, " with no messages waiting", sizeof(msgstatus));
+ }
+ snprintf(ourip, sizeof(ourip), "%s:%d", ast_inet_ntoa(reg->us.sin_addr), ntohs(reg->us.sin_port));