$NetBSD: patch-ag,v 1.1 2008/02/18 18:22:18 jlam Exp $ --- lib/openpam_readline.c.orig 2007-12-21 06:36:24.000000000 -0500 +++ lib/openpam_readline.c @@ -57,7 +57,7 @@ openpam_readline(FILE *f, int *lineno, s size_t len, size; int ch; - if ((line = malloc(MIN_LINE_LENGTH)) == NULL) + if ((line = malloc((size_t)MIN_LINE_LENGTH)) == NULL) return (NULL); size = MIN_LINE_LENGTH; len = 0; @@ -84,7 +84,7 @@ openpam_readline(FILE *f, int *lineno, s /* eof */ if (ch == EOF) { /* remove trailing whitespace */ - while (len > 0 && isspace((int)line[len - 1])) + while (len > 0 && isspace((unsigned char)line[len - 1])) --len; line[len] = '\0'; if (len == 0) @@ -97,7 +97,7 @@ openpam_readline(FILE *f, int *lineno, s ++*lineno; /* remove trailing whitespace */ - while (len > 0 && isspace((int)line[len - 1])) + while (len > 0 && isspace((unsigned char)line[len - 1])) --len; line[len] = '\0'; /* skip blank lines */