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 | 7424d6083962d58eef6daa83a036c189ca11431f (patch) | |
tree | d576e8851bedddbe33e684ee15be62485b63ee54 /klm/util | |
parent | 08c4a7fae8f0bec4f76c4e0928e357100eb7a1ca (diff) |
Trie fixes for SRI
Diffstat (limited to 'klm/util')
-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; } |