+++ /dev/null
-/*\r
- * Copyright (c) 2009 Intel Corporation. All rights reserved.\r
- *\r
- * This software is available to you under the OpenIB.org BSD license\r
- * below:\r
- *\r
- * Redistribution and use in source and binary forms, with or\r
- * without modification, are permitted provided that the following\r
- * conditions are met:\r
- *\r
- * - Redistributions of source code must retain the above\r
- * copyright notice, this list of conditions and the following\r
- * disclaimer.\r
- *\r
- * - Redistributions in binary form must reproduce the above\r
- * copyright notice, this list of conditions and the following\r
- * disclaimer in the documentation and/or other materials\r
- * provided with the distribution.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV\r
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
- * SOFTWARE.\r
- */\r
-\r
-#include <dlist.h>\r
-\r
-void DListInsertAfter(DLIST_ENTRY *pNew, DLIST_ENTRY *pHead)\r
-{\r
- pNew->Next = pHead->Next;\r
- pNew->Prev = pHead;\r
- pHead->Next->Prev = pNew;\r
- pHead->Next = pNew;\r
-}\r
-\r
-void DListRemove(DLIST_ENTRY *pEntry)\r
-{\r
- pEntry->Prev->Next = pEntry->Next;\r
- pEntry->Next->Prev = pEntry->Prev;\r
-}\r
return pHead->Next == pHead;\r
}\r
\r
-void DListInsertAfter(DLIST_ENTRY *pNew, DLIST_ENTRY *pHead);\r
+static void DListInsertAfter(DLIST_ENTRY *pNew, DLIST_ENTRY *pHead)\r
+{\r
+ pNew->Next = pHead->Next;\r
+ pNew->Prev = pHead;\r
+ pHead->Next->Prev = pNew;\r
+ pHead->Next = pNew;\r
+}\r
\r
static void DListInsertBefore(DLIST_ENTRY *pNew, DLIST_ENTRY *pHead)\r
{\r
#define DListInsertHead DListInsertAfter\r
#define DListInsertTail DListInsertBefore\r
\r
-void DListRemove(DLIST_ENTRY *pEntry);\r
+static void DListRemove(DLIST_ENTRY *pEntry)\r
+{\r
+ pEntry->Prev->Next = pEntry->Next;\r
+ pEntry->Next->Prev = pEntry->Prev;\r
+}\r
\r
#ifdef __cplusplus\r
}\r