aboutsummaryrefslogtreecommitdiffstats
path: root/src/list.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-02-05 10:17:33 +0000
committerEric Wong <normalperson@yhbt.net>2008-02-05 10:17:33 +0000
commit6fbdc721d972d8c1f823acd5473a3dce8836d5fa (patch)
treee72131541f4e887d5dedd6c75ffce455cbf6b97c /src/list.h
parent22efbd5eca4705426af5cee17a65a3e76c33bec6 (diff)
downloadmpd-6fbdc721d972d8c1f823acd5473a3dce8836d5fa.tar.gz
mpd-6fbdc721d972d8c1f823acd5473a3dce8836d5fa.tar.xz
mpd-6fbdc721d972d8c1f823acd5473a3dce8836d5fa.zip
fix -Wconst warnings
[ew: cleaned up the dirty union hack a bit] Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7180 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/list.h')
-rw-r--r--src/list.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/list.h b/src/list.h
index 62c40aef7..6aca5f503 100644
--- a/src/list.h
+++ b/src/list.h
@@ -30,7 +30,7 @@ typedef void ListFreeDataFunc(void *);
typedef struct _ListNode {
/* used to identify node (ie. when using findInList) */
- char *key;
+ const char *key;
/* data store in node */
void *data;
/* next node in list */
@@ -69,10 +69,10 @@ List *makeList(ListFreeDataFunc * freeDataFunc, int strdupKeys);
* _data_ -> data to be inserted in list
* returns 1 if successful, 0 otherwise
*/
-ListNode *insertInList(List * list, char *key, void *data);
+ListNode *insertInList(List * list, const char *key, void *data);
ListNode *insertInListBeforeNode(List * list, ListNode * beforeNode,
- int pos, char *key, void *data);
+ int pos, const char *key, void *data);
int insertInListWithoutKey(List * list, void *data);
@@ -81,7 +81,7 @@ int insertInListWithoutKey(List * list, void *data);
* _key_ -> key used to identify node to delete
* returns 1 if node is found and deleted, 0 otherwise
*/
-int deleteFromList(List * list, char *key);
+int deleteFromList(List * list, const char *key);
void deleteNodeFromList(List * list, ListNode * node);
@@ -93,11 +93,11 @@ void deleteNodeFromList(List * list, ListNode * node);
* _data_ can be NULL
* returns 1 if successful, 0 otherwise
*/
-int findInList(List * list, char *key, void **data);
+int findInList(List * list, const char *key, void **data);
/* if _key_ is not found, *_node_ is assigned to the node before which
the info would be found */
-int findNodeInList(List * list, char *key, ListNode ** node, int *pos);
+int findNodeInList(List * list, const char *key, ListNode ** node, int *pos);
/* frees memory malloc'd for list and its nodes
* _list_ -> List to be free'd