diff options
author | Kenneth Heafield <kenlm@kheafield.com> | 2011-10-11 14:58:52 -0400 |
---|---|---|
committer | Kenneth Heafield <kenlm@kheafield.com> | 2011-10-11 14:58:52 -0400 |
commit | 0e1ffb6c1528e44f63ae8bac466bd5163e973974 (patch) | |
tree | b7e87170f91d691b57616917a9cb6e58f5b4c2cc /klm/util/scoped.hh | |
parent | 0af7d663194beddcde420349bbd91430e0b2e423 (diff) |
Trie fixes for SRI
Diffstat (limited to 'klm/util/scoped.hh')
-rw-r--r-- | klm/util/scoped.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/klm/util/scoped.hh b/klm/util/scoped.hh index 12e6652b..93e2e817 100644 --- a/klm/util/scoped.hh +++ b/klm/util/scoped.hh @@ -50,7 +50,7 @@ class scoped_malloc { void call_realloc(std::size_t to) { void *ret; - UTIL_THROW_IF(!(ret = std::realloc(p_, to)), util::ErrnoException, "realloc to " << to << " bytes failed."); + UTIL_THROW_IF(!(ret = std::realloc(p_, to)) && to, util::ErrnoException, "realloc to " << to << " bytes failed."); p_ = ret; } |