From b31b15f4df7cbee309331ed06c9eb474765db832 Mon Sep 17 00:00:00 2001 From: stormrider1982 Date: Mon, 23 Feb 2004 11:14:09 +0000 Subject: [PATCH] =?UTF-8?q?all=C3=A9,=20on=20remet=20les=20d=C3=A9claratio?= =?UTF-8?q?ns=20de=20variables=20au=20d=C3=A9but=20;)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/nzg_allocate.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/nzg_allocate.c b/src/nzg_allocate.c index 9b29922..3d42009 100644 --- a/src/nzg_allocate.c +++ b/src/nzg_allocate.c @@ -26,9 +26,12 @@ void * msgAllocate(msgSpace *space, msgPoolDataTabSemId ressourceSemId; sem_t * ressourceSemFd; int ressourceSemVal; + int nbLockedSem; float minPoolCoef; int selectedPoolIndex; int bufferFreeIndex; + msgPoolData * mSPoolDataTabAddr; + selectedPoolIndex=-1; @@ -52,7 +55,6 @@ void * msgAllocate(msgSpace *space, return NULL; } - msgPoolData * mSPoolDataTabAddr; mSPoolDataTabAddr = mmap( 0, (space->poolNb) * sizeof( msgPoolData ), PROT_READ | PROT_WRITE, @@ -71,7 +73,7 @@ void * msgAllocate(msgSpace *space, semPoolCoef[i]=-1; } - int nbLockedSem=0; + nbLockedSem=0; if ( pool == ANYPOOL){ fprintf(stderr,"[ ALLOCATION ANYPOOL : %d ]\n",(int)getpid()); // choisir le pool au hasard (ou presque)