linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.{4,5} TRIVIAL PATCH] Change list_emtpy() to take a const pointer
@ 2003-08-18 21:28 Perez-Gonzalez, Inaky
  0 siblings, 0 replies; only message in thread
From: Perez-Gonzalez, Inaky @ 2003-08-18 21:28 UTC (permalink / raw)
  To: linux-kernel, trivial


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.

--- linux/include/linux/list.h
+++ linux/include/linux/list.h
@@ -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;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-08-18 21:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-18 21:28 [2.{4,5} TRIVIAL PATCH] Change list_emtpy() to take a const pointer Perez-Gonzalez, Inaky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).