svn commit: r249802 - in head: include lib/libc/gen
Eitan Adler
eadler at FreeBSD.org
Tue Apr 23 13:03:04 UTC 2013
Author: eadler
Date: Tue Apr 23 13:03:03 2013
New Revision: 249802
URL: http://svnweb.freebsd.org/changeset/base/249802
Log:
- 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
Modified:
head/include/stringlist.h
head/lib/libc/gen/stringlist.3
head/lib/libc/gen/stringlist.c
Modified: head/include/stringlist.h
==============================================================================
--- head/include/stringlist.h Tue Apr 23 13:03:01 2013 (r249801)
+++ head/include/stringlist.h Tue Apr 23 13:03:03 2013 (r249802)
@@ -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 */
Modified: head/lib/libc/gen/stringlist.3
==============================================================================
--- head/lib/libc/gen/stringlist.3 Tue Apr 23 13:03:01 2013 (r249801)
+++ head/lib/libc/gen/stringlist.3 Tue Apr 23 13:03:03 2013 (r249802)
@@ -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
Modified: head/lib/libc/gen/stringlist.c
==============================================================================
--- head/lib/libc/gen/stringlist.c Tue Apr 23 13:03:01 2013 (r249801)
+++ head/lib/libc/gen/stringlist.c Tue Apr 23 13:03:03 2013 (r249802)
@@ -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;
More information about the svn-src-head
mailing list