提交 b5d8fa9f authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-6956 modify commit 16365501 to use one single line which is only tolerable…

FS-6956 modify commit 16365501 to use one single line which is only tolerable way to have bracket-less if stmts.
上级 5dee5ce1
...@@ -129,9 +129,7 @@ SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t *buf, ui ...@@ -129,9 +129,7 @@ SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t *buf, ui
packet = (switch_stun_packet_t *) buf; packet = (switch_stun_packet_t *) buf;
packet->header.type = ntohs(packet->header.type); packet->header.type = ntohs(packet->header.type);
packet->header.length = ntohs(packet->header.length); packet->header.length = ntohs(packet->header.length);
if (packet->header.length > (bytes_left -= 20)) if (packet->header.length > (bytes_left -= 20)) return NULL;
return NULL;
/* /*
* Check packet type (RFC3489(bis?) values) * Check packet type (RFC3489(bis?) values)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论