提交 28af3acc authored 作者: Michael Jerris's avatar Michael Jerris

Wed May 13 13:18:14 CDT 2009 Pekka Pessi <first.last@nokia.com>

  * msg_mclass_insert_header(): not using uninit data
  Ignore-this: 40a6993391b5f2993af8ee01c407c0c7
  
  Coverity issue.


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13349 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 6774ad70
Fri May 15 11:14:26 CDT 2009 Fri May 15 11:14:57 CDT 2009
...@@ -164,25 +164,7 @@ int msg_mclass_insert_header(msg_mclass_t *mc, ...@@ -164,25 +164,7 @@ int msg_mclass_insert_header(msg_mclass_t *mc,
msg_hclass_t *hc, msg_hclass_t *hc,
unsigned short offset) unsigned short offset)
{ {
msg_href_t hr[1]; return msg_mclass_insert_with_mask(mc, hc, offset, 0);
if (mc == NULL || hc == NULL) {
errno = EINVAL;
return -1;
}
if (msg_hclass_offset(mc, NULL, hc))
return (void)(errno = EEXIST), -1;
if (offset == 0)
offset = mc->mc_msize, mc->mc_msize += sizeof(msg_header_t *);
assert(offset < mc->mc_msize);
hr->hr_class = hc;
hr->hr_offset = offset;
return msg_mclass_insert(mc, hr);
} }
/**Add a new header to the message class. /**Add a new header to the message class.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论