ca devrait etre bon pour les decla de variables...

This commit is contained in:
stormrider1982 2004-02-23 11:23:11 +00:00 committed by Glenn Y. Rolland
parent ee405dbe4e
commit 8de2c8a6a5
3 changed files with 4 additions and 4 deletions

View file

@ -5,6 +5,7 @@ int msgBufferInfoTabInit(msgPoolData * poolDataTabAddr,int poolIndex){
int bufferInfoTabFd; int bufferInfoTabFd;
msgBufferInfo * bufferInfoTabAddr; msgBufferInfo * bufferInfoTabAddr;
int bufferInfoNb; int bufferInfoNb;
int i;
//récuperer l'ID du BufferInfoTab; //récuperer l'ID du BufferInfoTab;
strcpy(bufferInfoTabId, poolDataTabAddr[poolIndex].bufferInfoTabId); strcpy(bufferInfoTabId, poolDataTabAddr[poolIndex].bufferInfoTabId);
@ -21,7 +22,6 @@ int bufferInfoNb;
bufferInfoTabAddr=mmap(NULL,bufferInfoNb*sizeof(msgBufferInfo), bufferInfoTabAddr=mmap(NULL,bufferInfoNb*sizeof(msgBufferInfo),
PROT_WRITE|PROT_READ,MAP_SHARED,bufferInfoTabFd,(off_t)0); PROT_WRITE|PROT_READ,MAP_SHARED,bufferInfoTabFd,(off_t)0);
int i;
for (i=0;i<bufferInfoNb;i++){ for (i=0;i<bufferInfoNb;i++){
bufferInfoTabAddr[i].ownerPid = (pid_t)-1; bufferInfoTabAddr[i].ownerPid = (pid_t)-1;
} }

View file

@ -10,6 +10,7 @@ int msgSpaceDelete(msgSpaceId externId){
//int shmId; //int shmId;
msgSpaceId nzgId; msgSpaceId nzgId;
msgSpace * space; msgSpace * space;
int i;
if (msgSpaceIdIntern(nzgId,externId) == -1){ if (msgSpaceIdIntern(nzgId,externId) == -1){
//TODO: message d'erreur //TODO: message d'erreur
return -1; return -1;
@ -17,7 +18,6 @@ int msgSpaceDelete(msgSpaceId externId){
space = msgSpaceOpen(externId); space = msgSpaceOpen(externId);
/* TODO: supprimer chaque pool */ /* TODO: supprimer chaque pool */
int i;
for (i=0;i<space->poolNb;i++){ for (i=0;i<space->poolNb;i++){
msgPoolDelete(externId,i); msgPoolDelete(externId,i);
} }