mirror of
https://github.com/ceph/ceph
synced 2024-12-25 21:03:31 +00:00
Merge pull request #3265 from yuyuyu101/coverify-fix
Event: Avoid illegal multiplication for memset Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
d54295e5a8
@ -120,7 +120,7 @@ int EventCenter::create_file_event(int fd, int mask, EventCallbackRef ctxt)
|
||||
lderr(cct) << __func__ << " failed to realloc file_events" << cpp_strerror(errno) << dendl;
|
||||
return -errno;
|
||||
}
|
||||
memset(file_events+sizeof(FileEvent)*nevent, 0, sizeof(FileEvent)*(new_size-nevent));
|
||||
memset(file_events+nevent, 0, sizeof(FileEvent)*(new_size-nevent));
|
||||
file_events = new_events;
|
||||
nevent = new_size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user