This commit is contained in:
stormrider1982 2004-02-23 23:20:06 +00:00
parent e42ccb6c9a
commit 767c5568d1
3 changed files with 7 additions and 7 deletions

View file

@ -19,8 +19,7 @@ int msgQueueElemAdd(msgQueue * queue, msgQueueElemId newElemId){
}
/* TODO: verifier si la liste n'est pas vide... */
if((strcmp(queue->headId,queue->id)==0)
&& (strcmp(queue->tailId,queue->id)==0)) {
if((queue->headId = queue->id) && (queue->tailId = queue->id)) {
NZG_ERROR("msgQueueAdd",queue->id);
goto ERROR;
}

View file

@ -28,8 +28,8 @@ msgQueue * queueInit(msgSpaceId externId, int queueIdx) {
/* on remplit la structure msgQueue */
queue->elemCounter = 0;
strcpy(queue->head,queue->id);
strcpy(queue->tail,queue->id);
queue->head = queue->id;
queue->tail = queue->id;

View file

@ -5,6 +5,7 @@
int msgQueueElemRem(msgQueue * queue, msgQueueElemId oldElemId){
msgQueueElem * queueOldHeadElem;
if (strcmp(queue->headId,queue->tailId)==0){
NZG_ERROR("msgQueueElemRem : Empty queue",queue->id);
goto ERROR;