diff options
Diffstat (limited to 'src/3rd_party/phf/phf.cc')
-rw-r--r-- | src/3rd_party/phf/phf.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/3rd_party/phf/phf.cc b/src/3rd_party/phf/phf.cc index a12d8130..7855565d 100644 --- a/src/3rd_party/phf/phf.cc +++ b/src/3rd_party/phf/phf.cc @@ -679,7 +679,8 @@ PHF_PUBLIC void PHF::compact(struct phf *phf) { } /* simply keep old array if realloc fails */ - if ((tmp = realloc(phf->g, phf->r * size))) + tmp = realloc(phf->g, phf->r * size); + if (tmp != 0) phf->g = static_cast<uint32_t *>(tmp); } /* PHF::compact() */ |