From d001beb2601515bc151c18af9c429081f7bf9916 Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Tue, 23 Apr 2013 13:03:03 +0000 Subject: [PATCH] - sl_find does not modify 'name' - make the prototype of sl_find match NetBSD Reviewed by: jilles Approved by: cperciva (mentor) MFC After: 3 days --- include/stringlist.h | 2 +- lib/libc/gen/stringlist.3 | 2 +- lib/libc/gen/stringlist.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/stringlist.h b/include/stringlist.h index bae2a2ca3871..d3154b3453c6 100644 --- a/include/stringlist.h +++ b/include/stringlist.h @@ -51,7 +51,7 @@ __BEGIN_DECLS StringList *sl_init(void); int sl_add(StringList *, char *); void sl_free(StringList *, int); -char *sl_find(StringList *, char *); +char *sl_find(StringList *, const char *); __END_DECLS #endif /* _STRINGLIST_H */ diff --git a/lib/libc/gen/stringlist.3 b/lib/libc/gen/stringlist.3 index 82465b6055e0..d4480beb0e2d 100644 --- a/lib/libc/gen/stringlist.3 +++ b/lib/libc/gen/stringlist.3 @@ -49,7 +49,7 @@ .Ft void .Fn sl_free "StringList *sl" "int freeall" .Ft char * -.Fn sl_find "StringList *sl" "char *item" +.Fn sl_find "StringList *sl" "const char *item" .Sh DESCRIPTION The .Nm diff --git a/lib/libc/gen/stringlist.c b/lib/libc/gen/stringlist.c index 9f3c3e882f32..a09a8e705e36 100644 --- a/lib/libc/gen/stringlist.c +++ b/lib/libc/gen/stringlist.c @@ -104,7 +104,7 @@ sl_free(StringList *sl, int all) * sl_find(): Find a name in the string list */ char * -sl_find(StringList *sl, char *name) +sl_find(StringList *sl, const char *name) { size_t i;