(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:
Markus Armbruster 2004-01-08 17:54:28 +00:00
parent 2910da23ea
commit 4ae9c417b3
79 changed files with 172 additions and 256 deletions

View file

@ -63,7 +63,7 @@ do_plague(struct sctstr *sp, struct natstr *np, int etu)
if (getvec(VT_ITEM, vec, (s_char *)sp, EF_SECTOR) <= 0)
return;
if (getvec(VT_COND, cvec, (s_char *)sp, EF_SECTOR) <= 0)
bzero((s_char *)cvec, sizeof(cvec));
memset(cvec, 0, sizeof(cvec));
if (cvec[C_PSTAGE] == 0) {
cvec[C_PSTAGE] = infect_people(np, vec, sp->sct_effic,