summaryrefslogtreecommitdiff
path: root/libexec/ld.so
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-24 00:13:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-24 00:13:56 +0000
commite253f541612124dc41f2391eaf48140df6a4c011 (patch)
tree3d9ae3f346e44751f7930ddd95421b6cc811b300 /libexec/ld.so
parent31f9c122559708c64ce309adc76cf92977734af2 (diff)
make more _dl_*() func params like real ones in libc
Diffstat (limited to 'libexec/ld.so')
-rw-r--r--libexec/ld.so/resolve.h8
-rw-r--r--libexec/ld.so/util.c4
-rw-r--r--libexec/ld.so/util.h16
3 files changed, 14 insertions, 14 deletions
diff --git a/libexec/ld.so/resolve.h b/libexec/ld.so/resolve.h
index 42112ad110a..cb67d39c363 100644
--- a/libexec/ld.so/resolve.h
+++ b/libexec/ld.so/resolve.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: resolve.h,v 1.12 2002/06/07 03:00:56 art Exp $ */
+/* $OpenBSD: resolve.h,v 1.13 2002/07/24 00:13:55 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -122,8 +122,8 @@ typedef struct elf_object {
extern void _dl_rt_resolve(void);
extern elf_object_t *_dl_add_object(const char *objname, Elf_Dyn *dynp,
- const u_long *, const int objtype,
- const long laddr, const long loff);
+ const u_long *, const int objtype,
+ const long laddr, const long loff);
extern void _dl_remove_object(elf_object_t *object);
extern elf_object_t *_dl_lookup_object(const char *objname);
@@ -134,7 +134,7 @@ extern int _dl_md_reloc(elf_object_t *object, int rel, int relsz);
extern void _dl_md_reloc_got(elf_object_t *object, int lazy);
Elf_Addr _dl_find_symbol(const char *name, elf_object_t *startlook,
- const Elf_Sym **ref, int myself, int warnnotfound);
+ const Elf_Sym **ref, int myself, int warnnotfound);
void _dl_rtld(elf_object_t *object);
void _dl_call_init(elf_object_t *object);
diff --git a/libexec/ld.so/util.c b/libexec/ld.so/util.c
index a16b1d4f697..8acf9bfc2cf 100644
--- a/libexec/ld.so/util.c
+++ b/libexec/ld.so/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.6 2002/07/07 08:54:50 jufi Exp $ */
+/* $OpenBSD: util.c,v 1.7 2002/07/24 00:13:55 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -66,7 +66,7 @@ _dl_strdup(const char *orig)
*/
void *
-_dl_malloc(int size)
+_dl_malloc(size_t size)
{
long *p, *t, *n;
diff --git a/libexec/ld.so/util.h b/libexec/ld.so/util.h
index 78e4de225ca..4a204b3e9df 100644
--- a/libexec/ld.so/util.h
+++ b/libexec/ld.so/util.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.h,v 1.7 2002/07/23 23:56:31 mickey Exp $ */
+/* $OpenBSD: util.h,v 1.8 2002/07/24 00:13:55 deraadt Exp $ */
/*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -36,7 +36,7 @@
#ifndef __DL_UTIL_H__
#define __DL_UTIL_H__
-void *_dl_malloc(const int size);
+void *_dl_malloc(const size_t size);
void _dl_free(void *);
char *_dl_strdup(const char *);
void _dl_printf(const char *fmt, ...);
@@ -56,12 +56,12 @@ _dl_wrstderr(const char *s)
}
static inline void *
-_dl_memset(void *p, const char v, size_t c)
+_dl_memset(void *p, const int v, size_t c)
{
char *ip = p;
while (c--)
- *ip++ = v;
+ *ip++ = (char)v;
return(p);
}
@@ -76,7 +76,7 @@ _dl_strlen(const char *p)
}
static inline size_t
-_dl_strlcpy(char *dst, const char *src, int siz)
+_dl_strlcpy(char *dst, const char *src, size_t siz)
{
char *d = dst;
const char *s = src;
@@ -102,13 +102,13 @@ _dl_strlcpy(char *dst, const char *src, int siz)
}
static inline int
-_dl_strncmp(const char *d, const char *s, int c)
+_dl_strncmp(const char *d, const char *s, size_t len)
{
- while (c-- && *d && *d == *s) {
+ while (len-- && *d && *d == *s) {
d++;
s++;
}
- if (c < 0)
+ if (len < 0)
return(0);
return(*d - *s);
}