From 35f4e999df73b81812bac1257a232cc01b2a7d9c Mon Sep 17 00:00:00 2001 From: David Phillips Date: Tue, 26 Apr 2016 14:03:58 +1200 Subject: atoi -> atol to match variables --- pgm-interlace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pgm-interlace.c b/pgm-interlace.c index 8aa94d6..6923dc9 100644 --- a/pgm-interlace.c +++ b/pgm-interlace.c @@ -131,7 +131,7 @@ int parse_header(FILE *fd, char *magic, long *width, long *height, int *white) fprintf(stderr, "Error reading width\n"); return 1; } - *width = atoi(token); + *width = atol(token); read_whitespace(fd); if (read_number(fd, token, sizeof(token))) @@ -139,7 +139,7 @@ int parse_header(FILE *fd, char *magic, long *width, long *height, int *white) fprintf(stderr, "Error reading height\n"); return 1; } - *height = atoi(token); /* size == height */ + *height = atol(token); /* size == height */ read_whitespace(fd); if (read_number(fd, token, sizeof(token))) @@ -147,7 +147,7 @@ int parse_header(FILE *fd, char *magic, long *width, long *height, int *white) fprintf(stderr, "Error reading white value\n"); return 1; } - *white = atoi(token); + *white = atol(token); /* standard dictates one whitespace character. This character must be * whitespace or EOF because of token parsing logic */ -- cgit v1.1