aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2007-04-07 13:36:53 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2007-04-07 13:36:53 +0000
commitce1e940217f4ad2978238f6c572db1ec2c9eefeb (patch)
tree75b458ba5ca85bf52d02d3445c213f20a650bdf8
parent9bc006de0ebb4bbcc2d34b5ae3bf57d2595dd8ad (diff)
downloadsrc-ce1e940217f4ad2978238f6c572db1ec2c9eefeb.tar.gz
src-ce1e940217f4ad2978238f6c572db1ec2c9eefeb.zip
Merge from upstream:
------------------------------------------------------------------------ r380 | des | 2006-03-14 15:42:09 +0100 (Tue, 14 Mar 2006) | 1 line Fix signedness mismatch, and use an explicit cast when calling ctype functions. ------------------------------------------------------------------------
Notes
Notes: svn path=/vendor/openpam/dist/; revision=168463
-rw-r--r--contrib/openpam/lib/openpam_readline.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/openpam/lib/openpam_readline.c b/contrib/openpam/lib/openpam_readline.c
index 11dda5cb3a01..222ed76c3df7 100644
--- a/contrib/openpam/lib/openpam_readline.c
+++ b/contrib/openpam/lib/openpam_readline.c
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $P4: //depot/projects/openpam/lib/openpam_readline.c#3 $
+ * $Id: openpam_readline.c 380 2006-03-14 14:42:09Z des $
*/
#include <ctype.h>
@@ -52,7 +52,7 @@
char *
openpam_readline(FILE *f, int *lineno, size_t *lenp)
{
- unsigned char *line;
+ char *line;
size_t len, size;
int ch;
@@ -63,7 +63,7 @@ openpam_readline(FILE *f, int *lineno, size_t *lenp)
#define line_putch(ch) do { \
if (len >= size - 1) { \
- unsigned char *tmp = realloc(line, size *= 2); \
+ char *tmp = realloc(line, size *= 2); \
if (tmp == NULL) \
goto fail; \
line = tmp; \
@@ -83,7 +83,7 @@ openpam_readline(FILE *f, int *lineno, size_t *lenp)
/* eof */
if (ch == EOF) {
/* remove trailing whitespace */
- while (len > 0 && isspace(line[len - 1]))
+ while (len > 0 && isspace((int)line[len - 1]))
--len;
line[len] = '\0';
if (len == 0)
@@ -96,7 +96,7 @@ openpam_readline(FILE *f, int *lineno, size_t *lenp)
++*lineno;
/* remove trailing whitespace */
- while (len > 0 && isspace(line[len - 1]))
+ while (len > 0 && isspace((int)line[len - 1]))
--len;
line[len] = '\0';
/* skip blank lines */