summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/base64.c5
-rw-r--r--openbsd-compat/bsd-closefrom.c4
-rw-r--r--openbsd-compat/sigact.c4
3 files changed, 7 insertions, 6 deletions
diff --git a/openbsd-compat/base64.c b/openbsd-compat/base64.c
index 6eadb5c1..9a60f583 100644
--- a/openbsd-compat/base64.c
+++ b/openbsd-compat/base64.c
@@ -139,7 +139,7 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize)
size_t datalength = 0;
u_char input[3];
u_char output[4];
- int i;
+ u_int i;
while (2 < srclength) {
input[0] = *src++;
@@ -206,7 +206,8 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize)
int
b64_pton(char const *src, u_char *target, size_t targsize)
{
- int tarindex, state, ch;
+ u_int tarindex, state;
+ int ch;
char *pos;
state = 0;
diff --git a/openbsd-compat/bsd-closefrom.c b/openbsd-compat/bsd-closefrom.c
index 61a9fa39..5b7b94ae 100644
--- a/openbsd-compat/bsd-closefrom.c
+++ b/openbsd-compat/bsd-closefrom.c
@@ -46,7 +46,7 @@
# define OPEN_MAX 256
#endif
-RCSID("$Id: bsd-closefrom.c,v 1.1 2004/08/15 08:41:00 djm Exp $");
+RCSID("$Id: bsd-closefrom.c,v 1.2 2005/11/10 08:29:13 dtucker Exp $");
#ifndef lint
static const char sudorcsid[] = "$Sudo: closefrom.c,v 1.6 2004/06/01 20:51:56 millert Exp $";
@@ -67,7 +67,7 @@ closefrom(int lowfd)
/* Check for a /proc/$$/fd directory. */
len = snprintf(fdpath, sizeof(fdpath), "/proc/%ld/fd", (long)getpid());
- if (len != -1 && len <= sizeof(fdpath) && (dirp = opendir(fdpath))) {
+ if (len >= 0 && (u_int)len <= sizeof(fdpath) && (dirp = opendir(fdpath))) {
while ((dent = readdir(dirp)) != NULL) {
fd = strtol(dent->d_name, &endp, 10);
if (dent->d_name != endp && *endp == '\0' &&
diff --git a/openbsd-compat/sigact.c b/openbsd-compat/sigact.c
index d1431a0d..8b8e4dd2 100644
--- a/openbsd-compat/sigact.c
+++ b/openbsd-compat/sigact.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: sigaction.c,v 1.3 1999/06/27 08:14:21 millert Exp $ */
+/* $OpenBSD: sigaction.c,v 1.4 2001/01/22 18:01:48 millert Exp $ */
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *