From d5b39ec6a6ed45e54748879c042e29d0a7251da5 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Thu, 04 Sep 2008 14:43:50 +0000 Subject: #8180 Local variables (in the stack) may be initialized NULL by default --- (limited to 'fill_src/eggfill.c') diff --git a/fill_src/eggfill.c b/fill_src/eggfill.c index 5c677b2..5de388d 100644 --- a/fill_src/eggfill.c +++ b/fill_src/eggfill.c @@ -110,22 +110,17 @@ void queue_enqueue(int element, queue *q){ } void queue_dequeue(queue *q){ - no *tmp; - if(tmp == NULL) { - printf("Out of space!!!"); - } else { - if(queue_is_empty(q)) { - printf( "Empty queue" ); - } - else { - tmp = q->front; - q->front = q->front->next; - if (q->front==NULL) { - q->rear=NULL; - } + if(queue_is_empty(q)) { + printf( "Empty queue" ); + } + else { + no *tmp = q->front; + q->front = q->front->next; + if (q->front==NULL) { + q->rear=NULL; } + free(tmp); } - free(tmp); }/* end of queue*/ void fill(GdkDrawable *drawable, GdkGC *gc, int x, int y, int width, int height, int color){ -- cgit v0.9.1