- /* Copy length to end. */
- if (lenp) {
- struct length *new_len;
-
- /* Clear between old end and new end. */
- if (clear && size > len.len) {
- char *old_end = (char *)(t + 1) + len.len;
- memset(old_end, 0, size - len.len);
- }
-
- new_len = (struct length *)((char *)(t + 1) + size
- + extra - sizeof(len));
- len.len = size;
- *new_len = len;
-
- /* Be careful replacing next ptr; could be old hdr. */
- if (lenp == &old_t->prop)
- t->prop = &new_len->hdr;
- else
- *lenp = &new_len->hdr;
+ /* Clear between old end and new end. */
+ if (clear && size > t->bytelen) {
+ char *old_end = (char *)(t + 1) + t->bytelen;
+ memset(old_end, 0, size - t->bytelen);