PERFORCE change 70219 for review
Dag-Erling Smorgrav
des at FreeBSD.org
Wed Feb 2 23:23:02 PST 2005
http://perforce.freebsd.org/chv.cgi?CH=70219
Change 70219 by des at 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; \
More information about the p4-projects
mailing list