diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2008-09-04 14:43:50 (GMT) |
---|---|---|
committer | Morgan Collett <morgan.collett@gmail.com> | 2008-09-09 14:06:42 (GMT) |
commit | d5b39ec6a6ed45e54748879c042e29d0a7251da5 (patch) | |
tree | 3d682a60425c9aea7bc17f4ea224a5862119ad9e | |
parent | fae8abaf86f9b114e598cfa96321a676e183af36 (diff) |
#8180 Local variables (in the stack) may be initialized NULL by default
-rw-r--r-- | fill_src/eggfill.c | 23 |
1 files changed, 9 insertions, 14 deletions
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){ |