fix compilation.
This commit is contained in:
parent
7b2c561b05
commit
315c7490d2
|
@ -68,7 +68,7 @@ ohash_resize(struct ohash *h)
|
|||
void *
|
||||
ohash_remove(struct ohash *h, unsigned int i)
|
||||
{
|
||||
void *result = (void *)h->t[i].p;
|
||||
void *result = __UNCONST(h->t[i].p);
|
||||
|
||||
if (result == NULL || result == DELETED)
|
||||
return NULL;
|
||||
|
@ -89,7 +89,7 @@ ohash_find(struct ohash *h, unsigned int i)
|
|||
if (h->t[i].p == DELETED)
|
||||
return NULL;
|
||||
else
|
||||
return (void *)h->t[i].p;
|
||||
return __UNCONST(h->t[i].p);
|
||||
}
|
||||
|
||||
void *
|
||||
|
|
|
@ -31,6 +31,6 @@ ohash_next(struct ohash *h, unsigned int *pos)
|
|||
{
|
||||
for (; *pos < h->size; (*pos)++)
|
||||
if (h->t[*pos].p != DELETED && h->t[*pos].p != NULL)
|
||||
return (void *)h->t[(*pos)++].p;
|
||||
return __UNCONST(h->t[(*pos)++].p);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,11 @@
|
|||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#if HAVE_NBTOOL_CONFIG_H
|
||||
#include "nbtool_config.h"
|
||||
#endif
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: strtonum.c,v 1.2 2009/10/26 21:14:18 christos Exp $");
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -25,6 +29,9 @@
|
|||
#define TOOSMALL 2
|
||||
#define TOOLARGE 3
|
||||
|
||||
long long
|
||||
strtonum(const char *numstr, long long minval, long long maxval,
|
||||
const char **errstrp);
|
||||
long long
|
||||
strtonum(const char *numstr, long long minval, long long maxval,
|
||||
const char **errstrp)
|
||||
|
|
Loading…
Reference in New Issue