mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
*** empty log message ***
svn path=/trunk/; revision=1570
This commit is contained in:
parent
12e9069480
commit
03832de6e4
1 changed files with 5 additions and 3 deletions
|
@ -222,10 +222,12 @@ __fileno_alloc(HANDLE hFile, int mode)
|
||||||
maxfno += 255;
|
maxfno += 255;
|
||||||
fileno_modes = (fileno_modes_type *)malloc(maxfno * sizeof(fileno_modes_type));
|
fileno_modes = (fileno_modes_type *)malloc(maxfno * sizeof(fileno_modes_type));
|
||||||
if ( old_fileno_modes != NULL )
|
if ( old_fileno_modes != NULL )
|
||||||
|
{
|
||||||
memcpy(fileno_modes, old_fileno_modes, oldcount * sizeof(fileno_modes_type));
|
memcpy(fileno_modes, old_fileno_modes, oldcount * sizeof(fileno_modes_type));
|
||||||
memset(fileno_modes + oldcount, 0, (maxfno-oldcount)*sizeof(fileno_modes));
|
|
||||||
free ( old_fileno_modes );
|
free ( old_fileno_modes );
|
||||||
}
|
}
|
||||||
|
memset(fileno_modes + oldcount, 0, (maxfno-oldcount)*sizeof(fileno_modes));
|
||||||
|
}
|
||||||
|
|
||||||
/* Fill in the value */
|
/* Fill in the value */
|
||||||
fileno_modes[i].fd = i;
|
fileno_modes[i].fd = i;
|
||||||
|
|
Loading…
Reference in a new issue