lkml.org 
[lkml]   [2003]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[TRIVIAL] [2.{4,5} TRIVIAL PATCH] Change list_emtpy() to take a const pointer
Date
From:  "Perez-Gonzalez, Inaky" <inaky.perez-gonzalez@intel.com>


Hi Rusty, list

Didn't know what was the best place to submit this one, I
guessed trivial.

Just change the definition of list_empty() to take a const
pointer. I have some upper layers of code that do all the
const/non-const thing and list_empty() breaks it without
this.


--- trivial-2.6.0-test4-bk5/include/linux/list.h.orig 2003-09-04 13:01:29.000000000 +1000
+++ trivial-2.6.0-test4-bk5/include/linux/list.h 2003-09-04 13:01:29.000000000 +1000
@@ -203,7 +203,7 @@
* list_empty - tests whether a list is empty
* @head: the list to test.
*/
-static inline int list_empty(struct list_head *head)
+static inline int list_empty(const struct list_head *head)
{
return head->next == head;
}
--
What is this? http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/
Don't blame me: the Monkey is driving
File: "Perez-Gonzalez, Inaky" <inaky.perez-gonzalez@intel.com>: [2.{4,5} TRIVIAL PATCH] Change list_emtpy() to take a const pointer
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.104 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site