diff options
| author | Joseph Myers <joseph@codesourcery.com> | 2019-02-04 23:46:58 +0000 |
|---|---|---|
| committer | Joseph Myers <joseph@codesourcery.com> | 2019-02-04 23:46:58 +0000 |
| commit | 77dc0d8643aa99c92bf671352b0a8adde705896f (patch) | |
| tree | b923a316fb159a97d39d38ec39d6c72d4f1a53c1 /ChangeLog | |
| parent | 7a0dcfc6439cd4e19bf393c2e2347e385361a82c (diff) | |
| download | glibc-77dc0d8643aa99c92bf671352b0a8adde705896f.tar.xz glibc-77dc0d8643aa99c92bf671352b0a8adde705896f.zip | |
Fix assertion in malloc.c:tcache_get.
One of the warnings that appears with -Wextra is "ordered comparison
of pointer with integer zero" in malloc.c:tcache_get, for the
assertion:
assert (tcache->entries[tc_idx] > 0);
Indeed, a "> 0" comparison does not make sense for
tcache->entries[tc_idx], which is a pointer. My guess is that
tcache->counts[tc_idx] is what's intended here, and this patch changes
the assertion accordingly.
Tested for x86_64.
* malloc/malloc.c (tcache_get): Compare tcache->counts[tc_idx]
with 0, not tcache->entries[tc_idx].
Diffstat (limited to 'ChangeLog')
| -rw-r--r-- | ChangeLog | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1,5 +1,8 @@ 2019-02-04 Joseph Myers <joseph@codesourcery.com> + * malloc/malloc.c (tcache_get): Compare tcache->counts[tc_idx] + with 0, not tcache->entries[tc_idx]. + * nscd/connections.c (reqinfo): Initialize SHUTDOWN element only once. |
