Commit 35699fe6 authored by Pekka Pessi's avatar Pekka Pessi

msg_mclass_insert_header(): not using uninit data

Ignore-this: 40a6993391b5f2993af8ee01c407c0c7

Coverity issue.

darcs-hash:20090513181814-db55f-a57ba98cf2d14baa05d231b90af499bc2c3fa762.gz
parent c08b12c0
......@@ -164,25 +164,7 @@ int msg_mclass_insert_header(msg_mclass_t *mc,
msg_hclass_t *hc,
unsigned short offset)
{
msg_href_t hr[1];
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);
return msg_mclass_insert_with_mask(mc, hc, offset, 0);
}
/**Add a new header to the message class.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment