03ec91f815
WMMon monitors the realtime CPU load as well the average system load and gives you some nice additional features too.
26 lines
634 B
Plaintext
26 lines
634 B
Plaintext
$OpenBSD: patch-wmgeneral_list_c,v 1.1.1.1 2000/11/18 13:53:32 naddy Exp $
|
|
--- wmgeneral/list.c.orig Tue May 19 23:13:23 1998
|
|
+++ wmgeneral/list.c Tue Oct 10 21:59:35 2000
|
|
@@ -44,8 +44,11 @@ list_cons(void* head, LinkedList* tail)
|
|
LinkedList* cell;
|
|
|
|
cell = (LinkedList*)malloc(sizeof(LinkedList));
|
|
- cell->head = head;
|
|
- cell->tail = tail;
|
|
+ if (cell)
|
|
+ {
|
|
+ cell->head = head;
|
|
+ cell->tail = tail;
|
|
+ }
|
|
return cell;
|
|
}
|
|
|
|
@@ -84,6 +87,7 @@ list_nth(int index, LinkedList* list)
|
|
INLINE void
|
|
list_remove_head(LinkedList** list)
|
|
{
|
|
+ if (!list) return;
|
|
if (!*list) return;
|
|
if ((*list)->tail)
|
|
{
|