Remove useless strncpy() in ac_encounter()

This commit is contained in:
Markus Armbruster 2008-09-24 19:31:15 -04:00
parent 7b4c0d171f
commit da363d621e

View file

@ -82,8 +82,6 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
int overfly[MAXNOC];
int flags;
struct emp_qelem ilist[MAXNOC];
char mypath[1024];
int myp;
int civ, mil;
natid plane_owner;
struct sctstr sect;
@ -103,9 +101,6 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
plp = (struct plist *)bomb_list->q_forw;
plane_owner = plp->plane.pln_own;
strncpy(mypath, path, sizeof(mypath));
myp = 0;
memset(overfly, 0, sizeof(overfly));
memset(gotilist, 0, sizeof(gotilist));
memset(unfriendly, 0, sizeof(unfriendly));
@ -133,7 +128,7 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
}
}
while ((dir = mypath[myp++]) && !QEMPTY(bomb_list)) {
while ((dir = *path++) && !QEMPTY(bomb_list)) {
if ((val = diridx(dir)) == DIR_STOP)
break;
/* XXX using xnorm is probably bad */