better dependencies for external links
[sliver-openvswitch.git] / lib / list.c
index a236f8c..fd06b81 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
  */
 #include <config.h>
 #include "list.h"
-#include <assert.h>
 
 /* Initializes 'list' as an empty list. */
 void
@@ -136,9 +135,9 @@ list_pop_back(struct list *list)
 struct list *
 list_front(const struct list *list_)
 {
-    struct list *list = (struct list *) list_;
+    struct list *list = CONST_CAST(struct list *, list_);
 
-    assert(!list_is_empty(list));
+    ovs_assert(!list_is_empty(list));
     return list->next;
 }
 
@@ -147,9 +146,9 @@ list_front(const struct list *list_)
 struct list *
 list_back(const struct list *list_)
 {
-    struct list *list = (struct list *) list_;
+    struct list *list = CONST_CAST(struct list *, list_);
 
-    assert(!list_is_empty(list));
+    ovs_assert(!list_is_empty(list));
     return list->prev;
 }