summaryrefslogtreecommitdiff
path: root/list.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-04 21:00:11 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-04 21:02:06 -0700
commitb2d0f04a50f1444f9d62d11636a28c89951f0f40 (patch)
treeea962d23f843a8d20401ddf0ec978c5914549111 /list.c
parent0f4f6462597841e5f8470571d56cfda61144ee8f (diff)
Add const attributes to fix gcc -Wwrite-strings warnings
Does not fix all of them since some lists contain constant strings and some contain dynamically allocated strings that need to be freed later. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'list.c')
-rw-r--r--list.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/list.c b/list.c
index 2854e18..1ca1998 100644
--- a/list.c
+++ b/list.c
@@ -27,7 +27,7 @@
#include "list.h"
int
-listMember(char *elt, ListPtr list)
+listMember(const char *elt, ListPtr list)
{
while(list != NULL) {
if(strcmp(elt, list->value) == 0)
@@ -87,7 +87,7 @@ dsprintf(const char *f, ...)
ListPtr
-listConsF(ListPtr cdr, char *f, ...)
+listConsF(ListPtr cdr, const char *f, ...)
{
va_list args;
char *string;
@@ -114,7 +114,7 @@ listConsF(ListPtr cdr, char *f, ...)
}
ListPtr
-listAdjoinF(ListPtr cdr, char *f, ...)
+listAdjoinF(ListPtr cdr, const char *f, ...)
{
va_list args;
char *string;