Commit 99818aae authored by Geoff Simmons's avatar Geoff Simmons

Minor DRY tweak.

parent 7f187041
...@@ -117,17 +117,13 @@ y_dup(struct pt_y *y0, unsigned short len) ...@@ -117,17 +117,13 @@ y_dup(struct pt_y *y0, unsigned short len)
assert(len < y0->len); assert(len < y0->len);
errno = 0; y = y_alloc(y0->idx, y0->off + len, y0->len - len);
ALLOC_OBJ(y, PT_Y_MAGIC);
if (y == NULL) if (y == NULL)
return (NULL); return (NULL);
y->leaf[0] = y0->leaf[0]; y->leaf[0] = y0->leaf[0];
y->leaf[1] = y0->leaf[1]; y->leaf[1] = y0->leaf[1];
y->bitmask = y0->bitmask; y->bitmask = y0->bitmask;
y->idx = y0->idx;
y->off = y0->off + len;
y->len = y0->len - len;
return (y); return (y);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment