diff options
| author | Nikolas Garofil <nikolas@garofil.be> | 2014-06-07 13:48:40 -0700 |
|---|---|---|
| committer | Barton E. Schaefer <schaefer@zsh.org> | 2014-06-07 13:48:40 -0700 |
| commit | 4f4d2b8247ef08e34fe73d91c0a8d8a2eb1f18c7 (patch) | |
| tree | 8cb6ff32488f450f6f3455cf5f4bf24f2c6f5eb2 /Src/mem.c | |
| parent | 32719: minor doc issues (diff) | |
| download | zsh-4f4d2b8247ef08e34fe73d91c0a8d8a2eb1f18c7.tar zsh-4f4d2b8247ef08e34fe73d91c0a8d8a2eb1f18c7.tar.gz zsh-4f4d2b8247ef08e34fe73d91c0a8d8a2eb1f18c7.tar.bz2 zsh-4f4d2b8247ef08e34fe73d91c0a8d8a2eb1f18c7.tar.lz zsh-4f4d2b8247ef08e34fe73d91c0a8d8a2eb1f18c7.tar.xz zsh-4f4d2b8247ef08e34fe73d91c0a8d8a2eb1f18c7.tar.zst zsh-4f4d2b8247ef08e34fe73d91c0a8d8a2eb1f18c7.zip | |
32737, 32736 (32741), 32735, 32734, 32733, 32732 (32739): Strict compilation
fixes
Src/utils.c: properly ifdef declarations
Src/zsh_system.h: memmove() should return its dest argument
Src/signals.c: define ret before use
Src/mem.c: remove unused pointers
Src/prototypes.h: use size_t in bcopy()
Src/compat.c: fix const declaration inconsistency
Diffstat (limited to 'Src/mem.c')
| -rw-r--r-- | Src/mem.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1508,7 +1508,7 @@ zsfree(char *p) MALLOC_RET_T realloc(MALLOC_RET_T p, MALLOC_ARG_T size) { - struct m_hdr *m = (struct m_hdr *)(((char *)p) - M_ISIZE), *mp, *mt; + struct m_hdr *m = (struct m_hdr *)(((char *)p) - M_ISIZE), *mt; char *r; int i, l = 0; @@ -1524,10 +1524,10 @@ realloc(MALLOC_RET_T p, MALLOC_ARG_T size) /* check if we are reallocating a small block, if we do, we have to compute the size of the block from the sort of block it is in */ for (i = 0; i < M_NSMALL; i++) { - for (mp = NULL, mt = m_small[i]; + for (mt = m_small[i]; mt && (((char *)mt) > ((char *)p) || (((char *)mt) + mt->len) < ((char *)p)); - mp = mt, mt = mt->next); + mt = mt->next); if (mt) { l = M_BSLEN(mt->len); |
