/* Reserve 2 directory chunks for "." and ".." */
curChunk += 2;
- while (curDirEntry!=cm_noLocalMountPoints) {
+ while (curDirEntry<cm_noLocalMountPoints) {
sizeOfCurEntry = cm_NameEntries((cm_localMountPoints+curDirEntry)->namep, 0);
if ((curChunk + sizeOfCurEntry >= CPP) ||
(curDirEntryInPage + 1 >= CM_DIR_EPP)) {
// 2. we have less than CM_DIR_EPP entries in page 0
// 3. we're not out of chunks in page 0
- while( (curDirEntry!=cm_noLocalMountPoints) &&
+ while( (curDirEntry<cm_noLocalMountPoints) &&
(curDirEntryInPage < CM_DIR_EPP) &&
(curChunk + cm_NameEntries((cm_localMountPoints+curDirEntry)->namep, 0) <= CPP))
{
curPage++;
// ok, page 0's done. Move on to the next page.
- while (curDirEntry!=cm_noLocalMountPoints) {
+ while (curDirEntry<cm_noLocalMountPoints) {
// setup a new page
curChunk = 1; // the zeroth chunk is reserved for page header
curDirEntryInPage = 0;
fakePageHeader.tag = htons(1234);
// while we're on the same page...
- while ( (curDirEntry!=cm_noLocalMountPoints) &&
+ while ( (curDirEntry<cm_noLocalMountPoints) &&
(curDirEntryInPage < CM_DIR_EPP) &&
(curChunk + cm_NameEntries((cm_localMountPoints+curDirEntry)->namep, 0) <= CPP))
{
// Check input buffer length.
// If too small, indicate the proper size and set the last error.
- if (*lpdwBufferLen < dwSidSize)
+ if (TextualSid == NULL || *lpdwBufferLen < dwSidSize)
{
*lpdwBufferLen = dwSidSize;
SetLastError(ERROR_INSUFFICIENT_BUFFER);