[Asterisk-cvs] asterisk/include/asterisk linkedlists.h,1.15,1.16
kpfleming
kpfleming
Wed Aug 24 19:08:14 CDT 2005
- Previous message: [Asterisk-cvs] zaptel kb1ec.h, NONE, 1.1 kb1ec_const.h, NONE,
1.1 zaptel.h, 1.44, 1.45 zconfig.h, 1.17, 1.18
- Next message: [Asterisk-cvs] asterisk/include/asterisk module.h,1.21,1.22
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv26364/include/asterisk
Modified Files:
linkedlists.h
Log Message:
make AST_LIST_REMOVE_HEAD safer to use
Index: linkedlists.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/linkedlists.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- linkedlists.h 8 Jul 2005 21:14:34 -0000 1.15
+++ linkedlists.h 24 Aug 2005 23:10:06 -0000 1.16
@@ -305,14 +305,15 @@
\param field This is the name of the field (declared using AST_LIST_ENTRY())
used to link entries of this list together.
- Removes the head entry from the list, and returns a pointer to it. The
- forward-link pointer in the returned entry is \b not cleared. This macro
- is safe to call on an empty list.
+ Removes the head entry from the list, and returns a pointer to it.
+ This macro is safe to call on an empty list.
*/
#define AST_LIST_REMOVE_HEAD(head, field) ({ \
typeof((head)->first) cur = (head)->first; \
- if (cur) \
+ if (cur) { \
(head)->first = cur->field.next; \
+ cur->field.next = NULL; \
+ } \
cur; \
})
- Previous message: [Asterisk-cvs] zaptel kb1ec.h, NONE, 1.1 kb1ec_const.h, NONE,
1.1 zaptel.h, 1.44, 1.45 zconfig.h, 1.17, 1.18
- Next message: [Asterisk-cvs] asterisk/include/asterisk module.h,1.21,1.22
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list