mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Initial import of svn+ssh:://svn.icir.org/bro/trunk/bro as of r7088
This commit is contained in:
commit
61757ac78b
1383 changed files with 380824 additions and 0 deletions
23
src/IntSet.cc
Normal file
23
src/IntSet.cc
Normal file
|
@ -0,0 +1,23 @@
|
|||
// $Id: IntSet.cc 80 2004-07-14 20:15:50Z jason $
|
||||
|
||||
#include "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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue