- 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
This commit is contained in:
Eitan Adler 2013-04-23 13:03:03 +00:00
parent 240f872cb8
commit d001beb260
3 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ __BEGIN_DECLS
StringList *sl_init(void); StringList *sl_init(void);
int sl_add(StringList *, char *); int sl_add(StringList *, char *);
void sl_free(StringList *, int); void sl_free(StringList *, int);
char *sl_find(StringList *, char *); char *sl_find(StringList *, const char *);
__END_DECLS __END_DECLS
#endif /* _STRINGLIST_H */ #endif /* _STRINGLIST_H */

View File

@ -49,7 +49,7 @@
.Ft void .Ft void
.Fn sl_free "StringList *sl" "int freeall" .Fn sl_free "StringList *sl" "int freeall"
.Ft char * .Ft char *
.Fn sl_find "StringList *sl" "char *item" .Fn sl_find "StringList *sl" "const char *item"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Nm .Nm

View File

@ -104,7 +104,7 @@ sl_free(StringList *sl, int all)
* sl_find(): Find a name in the string list * sl_find(): Find a name in the string list
*/ */
char * char *
sl_find(StringList *sl, char *name) sl_find(StringList *sl, const char *name)
{ {
size_t i; size_t i;