Show More
@@ -71,7 +71,7 b' static int xdl_init_classifier(xdlclassi' | |||||
71 | cf->flags = flags; |
|
71 | cf->flags = flags; | |
72 |
|
72 | |||
73 | cf->hbits = xdl_hashbits(size); |
|
73 | cf->hbits = xdl_hashbits(size); | |
74 | cf->hsize = 1 << cf->hbits; |
|
74 | cf->hsize = ((uint64_t)1) << cf->hbits; | |
75 |
|
75 | |||
76 | if (xdl_cha_init(&cf->ncha, sizeof(xdlclass_t), size / 4 + 1) < 0) { |
|
76 | if (xdl_cha_init(&cf->ncha, sizeof(xdlclass_t), size / 4 + 1) < 0) { | |
77 |
|
77 | |||
@@ -263,7 +263,7 b' static int xdl_prepare_ctx(unsigned int ' | |||||
263 |
|
263 | |||
264 | { |
|
264 | { | |
265 | hbits = xdl_hashbits(narec); |
|
265 | hbits = xdl_hashbits(narec); | |
266 | hsize = 1 << hbits; |
|
266 | hsize = ((uint64_t)1) << hbits; | |
267 | if (!(rhash = (xrecord_t **) xdl_malloc(hsize * sizeof(xrecord_t *)))) |
|
267 | if (!(rhash = (xrecord_t **) xdl_malloc(hsize * sizeof(xrecord_t *)))) | |
268 | goto abort; |
|
268 | goto abort; | |
269 | memset(rhash, 0, hsize * sizeof(xrecord_t *)); |
|
269 | memset(rhash, 0, hsize * sizeof(xrecord_t *)); |
General Comments 0
You need to be logged in to leave comments.
Login now