projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
datapath: Don't use vlan_features before 2.6.26.
[openvswitch]
/
lib
/
list.c
diff --git
a/lib/list.c
b/lib/list.c
index 8aedd7573656cbc4beedd514019c42a855bdb686..4ffa8837756c36264094bf4729eea26faedc0eaf 100644
(file)
--- a/
lib/list.c
+++ b/
lib/list.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009
, 2010
Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-24,6
+24,14
@@
list_init(struct list *list)
list->next = list->prev = list;
}
list->next = list->prev = list;
}
+/* Initializes 'list' with pointers that will (probably) cause segfaults if
+ * dereferenced and, better yet, show up clearly in a debugger. */
+void
+list_poison(struct list *list)
+{
+ memset(list, 0xcc, sizeof *list);
+}
+
/* Inserts 'elem' just before 'before'. */
void
list_insert(struct list *before, struct list *elem)
/* Inserts 'elem' just before 'before'. */
void
list_insert(struct list *before, struct list *elem)