zeek/src/IntSet.cc
Robin Sommer 3957091e1b Renaming config.h to bro-config.h.
A couple times now I had this conflicting with files of the same name
in other projects.
2015-07-28 11:57:04 -07:00

21 lines
352 B
C++

#include "bro-config.h"
#ifdef HAVE_MEMORY_H
#include <memory.h>
#endif
#include <stdlib.h>
#include "IntSet.h"
void IntSet::Expand(unsigned int i)
{
unsigned int newsize = i / 8 + 1;
unsigned char* newset = new unsigned char[newsize];
memset(newset, 0, newsize);
memcpy(newset, set, size);
delete [] set;
size = newsize;
set = newset;
}