summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatthew <>2014-07-18 04:16:09 +0000
committermatthew <>2014-07-18 04:16:09 +0000
commitfb7d9a3e4e97fc1683b309ec917f9b34f225ec4a (patch)
treee656644d3b905953690e4785ce4ce02615c9fbc0
parentacdbce862be55ac5aef43be691bd06f8b9fab41b (diff)
downloadopenbsd-fb7d9a3e4e97fc1683b309ec917f9b34f225ec4a.tar.gz
openbsd-fb7d9a3e4e97fc1683b309ec917f9b34f225ec4a.tar.bz2
openbsd-fb7d9a3e4e97fc1683b309ec917f9b34f225ec4a.zip
Change lsearch()'s "base" argument to require a non-const pointer to
align with POSIX and other systems. Pointed out by Elliott Hughes on tech ok deraadt
-rw-r--r--src/lib/libc/stdlib/lsearch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/lsearch.c b/src/lib/libc/stdlib/lsearch.c
index a01d80e008..8cad05f510 100644
--- a/src/lib/libc/stdlib/lsearch.c
+++ b/src/lib/libc/stdlib/lsearch.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: lsearch.c,v 1.4 2009/10/27 23:59:59 deraadt Exp $ */ 1/* $OpenBSD: lsearch.c,v 1.5 2014/07/18 04:16:09 matthew Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1989, 1993 4 * Copyright (c) 1989, 1993
@@ -41,7 +41,7 @@ static void *linear_base(const void *, const void *, size_t *, size_t,
41 cmp_fn_t, int); 41 cmp_fn_t, int);
42 42
43void * 43void *
44lsearch(const void *key, const void *base, size_t *nelp, size_t width, 44lsearch(const void *key, void *base, size_t *nelp, size_t width,
45 cmp_fn_t compar) 45 cmp_fn_t compar)
46{ 46{
47 47