(bzero, bcopy): Obsolete BSDisms; remove. Remove some calls without
effect. Replace calls by struct assignment where possible. Replace clear buffer, copy string to buffer by strncpy(). Use assignment to clear when that's clearer. Replace overlapping copy through bounce buffer by memmove(). Replace rest by standard memset() and memcpy(). Also use sizeof() instead of literal array sizes for robustness, and instead of symbolic array sizes for clarity.
This commit is contained in:
parent
2910da23ea
commit
4ae9c417b3
79 changed files with 172 additions and 256 deletions
|
@ -200,7 +200,7 @@ ef_read(int type, int id, caddr_t ptr)
|
|||
fillcache(ep, id);
|
||||
from = ep->cache + (id - ep->baseid) * ep->size;
|
||||
}
|
||||
bcopy(from, ptr, ep->size);
|
||||
memcpy(ptr, from, ep->size);
|
||||
|
||||
if (ep->postread)
|
||||
ep->postread(id, ptr);
|
||||
|
@ -290,7 +290,7 @@ ef_write(int type, int id, caddr_t ptr)
|
|||
if (id >= ep->baseid && id < ep->baseid + ep->cids) {
|
||||
/* update the cache if necessary */
|
||||
to = ep->cache + (id - ep->baseid) * ep->size;
|
||||
bcopy(ptr, to, ep->size);
|
||||
memcpy(to, ptr, ep->size);
|
||||
}
|
||||
if (id > ep->fids) {
|
||||
logerror("WARNING ef_write: expanded %s by more than one id",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue