projects
/
oweals
/
tinc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Various small fixes.
[oweals/tinc.git]
/
lib
/
list.c
diff --git
a/lib/list.c
b/lib/list.c
index a09cbeadbe5b63b06eff5e6f4c79afff1aa8c830..6ade9e8a4fae2338a1f4199bbe8127d7f1c90df1 100644
(file)
--- a/
lib/list.c
+++ b/
lib/list.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: list.c,v 1.1.2.
2 2000/11/16 22:13:08 zarq
Exp $
+ $Id: list.c,v 1.1.2.
3 2000/11/20 22:13:00 guus
Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-143,6
+143,7
@@
void list_append(list_t *list, void *data)
n = xmalloc_and_zero(sizeof(list_node_t));
n->data = data;
n->prev = list->tail;
n = xmalloc_and_zero(sizeof(list_node_t));
n->data = data;
n->prev = list->tail;
- list->tail->next = n;
+ if(list->tail)
+ list->tail->next = n;
list->tail = n;
}
list->tail = n;
}