Mercurial > LinkedList
changeset 3:34f1d2f54d37
cleanup
author | Eris Caffee <discordia@eldalin.com> |
---|---|
date | Tue, 10 May 2011 19:48:12 -0500 |
parents | c6e339846527 |
children | c9e6f5c0a9b2 |
files | src/LinkedList.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line diff
1.1 --- a/src/LinkedList.c Fri Dec 31 12:47:46 2010 -0600 1.2 +++ b/src/LinkedList.c Tue May 10 19:48:12 2011 -0500 1.3 @@ -68,6 +68,7 @@ 1.4 if ((!this) || (!data)) 1.5 return NULL; 1.6 1.7 + /* If at end of list or list is empty or list has only one element */ 1.8 if (this->Curr == this->Tail) 1.9 { 1.10 return ll_push(this, data); 1.11 @@ -174,7 +175,7 @@ 1.12 1.13 if (this->Curr == this->Head) 1.14 { 1.15 - this->Curr->next->prev = NULL; 1.16 + this->Head->next->prev = NULL; 1.17 this->Head = this->Curr = this->Head->next; 1.18 } 1.19 else