Date: Thu, 3 Feb 2005 07:23:01 GMT From: Dag-Erling Smorgrav <des@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 70219 for review Message-ID: <200502030723.j137N1dB009638@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=70219 Change 70219 by des@des.at.des.thinksec.com on 2005/02/03 07:22:02 Better to use unsigned char when isspace() is involved. Affected files ... .. //depot/projects/openpam/lib/openpam_readline.c#3 edit Differences ... ==== //depot/projects/openpam/lib/openpam_readline.c#3 (text+ko) ==== @@ -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#2 $ + * $P4: //depot/projects/openpam/lib/openpam_readline.c#3 $ */ #include <ctype.h> @@ -52,7 +52,7 @@ char * openpam_readline(FILE *f, int *lineno, size_t *lenp) { - char *line; + unsigned char *line; size_t len, size; int ch; @@ -63,7 +63,7 @@ #define line_putch(ch) do { \ if (len >= size - 1) { \ - char *tmp = realloc(line, size *= 2); \ + unsigned char *tmp = realloc(line, size *= 2); \ if (tmp == NULL) \ goto fail; \ line = tmp; \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502030723.j137N1dB009638>
