Revive struct empfile callback init as oninit
Commit a71f0158
removed unused callback init. Bring it back renamed
to oninit, and without the redundant first argument.
This commit is contained in:
parent
b22520d180
commit
a1f20efd02
3 changed files with 21 additions and 13 deletions
|
@ -667,12 +667,14 @@ do_blank(struct empfile *ep, void *buf, int id, int count)
|
|||
struct emptypedstr *elt;
|
||||
|
||||
memset(buf, 0, count * ep->size);
|
||||
if (ep->flags & EFF_TYPED) {
|
||||
for (i = 0; i < count; i++) {
|
||||
elt = (struct emptypedstr *)((char *)buf + i * ep->size);
|
||||
for (i = 0; i < count; i++) {
|
||||
elt = (struct emptypedstr *)((char *)buf + i * ep->size);
|
||||
if (ep->flags & EFF_TYPED) {
|
||||
elt->ef_type = ep->uid;
|
||||
elt->uid = id + i;
|
||||
}
|
||||
if (ep->oninit)
|
||||
ep->oninit(elt);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue