summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-06-08 06:49:21 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-06-08 06:49:21 +0000
commitd70d914d9394e21aae56f63f23a55cfaa1bb5b57 (patch)
tree7e8331326bebf3b4466cb66ff4c82f59c309c5b3 /libexec
parentf1b4fbed12a179d3192ed31dc3fa2794578a1572 (diff)
Be consistent. If we have inveted our of strlen, use it everywhere.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ld.so/sod.c8
-rw-r--r--libexec/ld.so/strdup.c6
2 files changed, 9 insertions, 5 deletions
diff --git a/libexec/ld.so/sod.c b/libexec/ld.so/sod.c
index fe2b51068f5..3513c9e8228 100644
--- a/libexec/ld.so/sod.c
+++ b/libexec/ld.so/sod.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sod.c,v 1.4 2001/05/31 10:16:30 art Exp $ */
+/* $OpenBSD: sod.c,v 1.5 2001/06/08 06:49:20 art Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
* All rights reserved.
@@ -43,6 +43,8 @@
#include <unistd.h>
#include <syscall.h>
+#include "archdep.h"
+
#define PAGSIZ __LDPGSZ
char * _dl_strdup(const char *);
void _dl_free(void *);
@@ -77,7 +79,7 @@ _dl_build_sod(name, sodp)
cp = (char *)sodp->sod_name + 3;
/* dot guardian */
- if ((strchr(cp, '.') == NULL) || (*(cp+strlen(cp)-1) == '.'))
+ if ((strchr(cp, '.') == NULL) || (*(cp+_dl_strlen(cp)-1) == '.'))
return;
/* default */
@@ -241,7 +243,7 @@ _dl_findhint(name, major, minor, prefered_path)
if (prefered_path == NULL ||
strncmp(prefered_path,
hstrtab + bp->hi_pathx,
- strlen(prefered_path)) == 0) {
+ _dl_strlen(prefered_path)) == 0) {
return hstrtab + bp->hi_pathx;
}
}
diff --git a/libexec/ld.so/strdup.c b/libexec/ld.so/strdup.c
index c5d7615b2cb..1a277ca0554 100644
--- a/libexec/ld.so/strdup.c
+++ b/libexec/ld.so/strdup.c
@@ -1,6 +1,8 @@
-/* $OpenBSD: strdup.c,v 1.3 2001/04/02 23:11:21 drahn Exp $ */
+/* $OpenBSD: strdup.c,v 1.4 2001/06/08 06:49:19 art Exp $ */
#include <string.h>
+#include <sys/types.h>
+#include "archdep.h"
void * _dl_malloc(int);
@@ -8,7 +10,7 @@ char *
_dl_strdup(const char *orig)
{
char *newstr;
- newstr = _dl_malloc(strlen(orig)+1);
+ newstr = _dl_malloc(_dl_strlen(orig)+1);
strcpy(newstr, orig);
return (newstr);
}