Source and destination arguments to strncpy were swapped. This mistake

was made in the conversion of bcopy() to strncpy().
This commit is contained in:
Joel Sherrill
1999-11-16 15:26:29 +00:00
parent c276c87111
commit b88691c30f
3 changed files with 3 additions and 3 deletions

View File

@@ -112,7 +112,7 @@ scandir(dirname, namelist, select, dcomp)
p->d_ino = d->d_ino;
p->d_reclen = d->d_reclen;
p->d_namlen = d->d_namlen;
strncpy(d->d_name, p->d_name, p->d_namlen + 1);
strncpy(p->d_name, d->d_name, p->d_namlen + 1);
/*
* Check to make sure the array has space left and
* realloc the maximum size.

View File

@@ -112,7 +112,7 @@ scandir(dirname, namelist, select, dcomp)
p->d_ino = d->d_ino;
p->d_reclen = d->d_reclen;
p->d_namlen = d->d_namlen;
strncpy(d->d_name, p->d_name, p->d_namlen + 1);
strncpy(p->d_name, d->d_name, p->d_namlen + 1);
/*
* Check to make sure the array has space left and
* realloc the maximum size.

View File

@@ -112,7 +112,7 @@ scandir(dirname, namelist, select, dcomp)
p->d_ino = d->d_ino;
p->d_reclen = d->d_reclen;
p->d_namlen = d->d_namlen;
strncpy(d->d_name, p->d_name, p->d_namlen + 1);
strncpy(p->d_name, d->d_name, p->d_namlen + 1);
/*
* Check to make sure the array has space left and
* realloc the maximum size.