diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-03-21 14:06:35 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-03-21 14:09:32 -0700 |
| commit | 0574c613cd00c03d287316a4c78c797ba0beea51 (patch) | |
| tree | 0f051330f297db9e24e54a5ae95d0a84b7657f2e /lib/list.h | |
| parent | 47ab7668cc7c57543a645b870855b0e763b1d0da (diff) | |
| download | openvswitch-0574c613cd00c03d287316a4c78c797ba0beea51.tar.gz | |
list: Allow list_front(), list_back() to take 'const' arguments.
It totally makes sense to pass a const struct list * to one of these
functions. Ideally the return type would be the same as the argument
type but C can't handle that, so this is the best second choice.
Diffstat (limited to 'lib/list.h')
| -rw-r--r-- | lib/list.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/list.h b/lib/list.h index ddb0e6592..915ee854d 100644 --- a/lib/list.h +++ b/lib/list.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010 Nicira Networks. + * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,8 +47,8 @@ struct list *list_pop_front(struct list *); struct list *list_pop_back(struct list *); /* List elements. */ -struct list *list_front(struct list *); -struct list *list_back(struct list *); +struct list *list_front(const struct list *); +struct list *list_back(const struct list *); /* List properties. */ size_t list_size(const struct list *); |
