diff options
author | David Phillips <dbphillipsnz@gmail.com> | 2016-04-26 14:03:58 +1200 |
---|---|---|
committer | David Phillips <dbphillipsnz@gmail.com> | 2016-04-26 14:18:27 +1200 |
commit | 35f4e999df73b81812bac1257a232cc01b2a7d9c (patch) | |
tree | a2607325003a66a9e7b4c746ceb101b46c1c299f /pgm-interlace.c | |
parent | ae7fb50f90a79743eb6c6ed564a5742c2bb5c7d5 (diff) | |
download | pgm-interlace-35f4e999df73b81812bac1257a232cc01b2a7d9c.tar.xz |
atoi -> atol to match variables
Diffstat (limited to 'pgm-interlace.c')
-rw-r--r-- | pgm-interlace.c | 6 |
1 files 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 */ |