Show
Ignore:
Timestamp:
07/15/08 10:05:10 (4 years ago)
Author:
mwhitworth
Message:

Add comments, fix warnings.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/branches/fs/fs/ext3/ialloc.c

    r807 r809  
    1818 
    1919#include <bitmap.h> 
     20#include <malloc.h> 
     21#include <print.h> 
    2022 
    2123#include "ext3.h" 
     
    3739struct VNode* Ext3CreateINode(struct JournalHandle* handle, struct VNode* dir, int isDir) 
    3840{ 
    39         DWORD groupNo; 
    40         struct Ext3GroupDesc* desc; 
    41         struct Buffer* groupBuffer; 
     41        DWORD groupNo=0; 
     42        struct Ext3GroupDesc* desc=NULL; 
     43        struct Buffer* groupBuffer=NULL; 
    4244        struct Buffer* bitmapBuffer; 
    43         int i; 
     45        DWORD i; 
    4446        struct VfsSuperBlock* superBlock=dir->superBlock; 
    4547        struct Ext3SbInfo* sbInfo=EXT3_SUPERINFO(superBlock); 
     
    7375                } 
    7476        } 
     77 
     78        if (!groupBuffer || !desc) 
     79                return -ENOSPC; 
    7580         
    7681        bitmapBuffer=Ext3INodeLoadBitmap(superBlock, groupNo);