summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libcompat/4.1/ftime.c4
-rw-r--r--lib/libcompat/4.3/rexec.c5
-rw-r--r--lib/libcompat/regexp/regsub.c10
3 files changed, 10 insertions, 9 deletions
diff --git a/lib/libcompat/4.1/ftime.c b/lib/libcompat/4.1/ftime.c
index 18dbeb11c51..45c00e01c7e 100644
--- a/lib/libcompat/4.1/ftime.c
+++ b/lib/libcompat/4.1/ftime.c
@@ -29,7 +29,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: ftime.c,v 1.1 1995/10/18 08:42:34 deraadt Exp $";
+static char rcsid[] = "$Id: ftime.c,v 1.2 1996/12/14 07:01:27 tholo Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -45,7 +45,7 @@ ftime(tbp)
if (gettimeofday(&t, &tz) < 0)
return (-1);
- tbp->millitm = t.tv_usec / 1000;
+ tbp->millitm = (unsigned short)(t.tv_usec / 1000);
tbp->time = t.tv_sec;
tbp->timezone = tz.tz_minuteswest;
tbp->dstflag = tz.tz_dsttime;
diff --git a/lib/libcompat/4.3/rexec.c b/lib/libcompat/4.3/rexec.c
index 2ce19427029..346caa01874 100644
--- a/lib/libcompat/4.3/rexec.c
+++ b/lib/libcompat/4.3/rexec.c
@@ -59,8 +59,9 @@ rexec(ahost, rport, name, pass, cmd, fd2p)
{
struct sockaddr_in sin, sin2, from;
struct hostent *hp;
+ unsigned timo = 1;
u_short port;
- int s, timo = 1, s3;
+ int s, s3;
char c;
hp = gethostbyname(*ahost);
@@ -79,7 +80,7 @@ retry:
sin.sin_family = hp->h_addrtype;
sin.sin_len = sizeof(sin);
sin.sin_port = rport;
- bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length);
+ bcopy(hp->h_addr, (char *)&sin.sin_addr, (size_t)hp->h_length);
if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
if (errno == ECONNREFUSED && timo <= 16) {
(void) close(s);
diff --git a/lib/libcompat/regexp/regsub.c b/lib/libcompat/regexp/regsub.c
index 9bd32b00f7f..ab457a2c17b 100644
--- a/lib/libcompat/regexp/regsub.c
+++ b/lib/libcompat/regexp/regsub.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: regsub.c,v 1.2 1996/07/24 05:39:12 downsj Exp $ */
+/* $OpenBSD: regsub.c,v 1.3 1996/12/14 07:01:29 tholo Exp $ */
/*
* regsub
@@ -22,7 +22,7 @@
*/
#ifndef lint
-static char *rcsid = "$OpenBSD: regsub.c,v 1.2 1996/07/24 05:39:12 downsj Exp $";
+static char *rcsid = "$OpenBSD: regsub.c,v 1.3 1996/12/14 07:01:29 tholo Exp $";
#endif /* not lint */
#include <regexp.h>
@@ -45,11 +45,11 @@ const regexp *prog;
const char *source;
char *dest;
{
- register char *src;
+ register const char *src;
+ register size_t len;
register char *dst;
register char c;
register int no;
- register int len;
if (prog == NULL || source == NULL || dest == NULL) {
v8_regerror("NULL parm to regsub");
@@ -60,7 +60,7 @@ char *dest;
return;
}
- src = (char *)source;
+ src = source;
dst = dest;
while ((c = *src++) != '\0') {
if (c == '&')