diff options
| author | Johan Hedberg <johan.hedberg@nokia.com> | 2006-08-25 13:17:24 +0000 | 
|---|---|---|
| committer | Johan Hedberg <johan.hedberg@nokia.com> | 2006-08-25 13:17:24 +0000 | 
| commit | dbe289f011a9ecedf0f4cabb9f25c9564c8aa830 (patch) | |
| tree | cffb67e5a8afb9932f5cc064a1234a8dd7fc5ddc /common/list.c | |
| parent | 39a699d168f52632ecd959a8e31b736ba86ad0ed (diff) | |
Fix and cleanup watch functionality
Diffstat (limited to 'common/list.c')
| -rw-r--r-- | common/list.c | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/common/list.c b/common/list.c index 42d377b7..a887bcdd 100644 --- a/common/list.c +++ b/common/list.c @@ -55,6 +55,21 @@ struct slist *slist_append(struct slist *list, void *data)  	return list;  } +struct slist *slist_prepend(struct slist *list, void *data) +{ +	struct slist *entry; + +	entry = malloc(sizeof(struct slist)); +	/* FIXME: this currently just silently fails */ +	if (!entry) +		return list; + +	entry->data = data; +	entry->next = list; + +	return entry; +} +  struct slist *slist_remove(struct slist *list, void *data)  {  	struct slist *l, *next, *prev = NULL, *match = NULL; | 
