aboutsummaryrefslogtreecommitdiff
path: root/pgm-interlace.c
diff options
context:
space:
mode:
authorDavid Phillips <dbphillipsnz@gmail.com>2016-04-25 23:22:50 +1200
committerDavid Phillips <dbphillipsnz@gmail.com>2016-04-26 14:18:20 +1200
commitae7fb50f90a79743eb6c6ed564a5742c2bb5c7d5 (patch)
tree7430882091ab099304b5cbfcdcb20d670e084c04 /pgm-interlace.c
parent5439b61c4a3b65cae7ea24720a1b5e6c9592fe48 (diff)
downloadpgm-interlace-ae7fb50f90a79743eb6c6ed564a5742c2bb5c7d5.tar.xz
Initialise everything for good form
Diffstat (limited to 'pgm-interlace.c')
-rw-r--r--pgm-interlace.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/pgm-interlace.c b/pgm-interlace.c
index 7596fe5..8aa94d6 100644
--- a/pgm-interlace.c
+++ b/pgm-interlace.c
@@ -27,7 +27,6 @@
/*
* general FIXME:
- * be strict about initialisation of vars
* add func names to error messages
* consolidate magic number string to #define or something. hardcoded is evil
*/
@@ -162,9 +161,13 @@ int parse_header(FILE *fd, char *magic, long *width, long *height, int *white)
int main(int argc, char **argv)
{
- int i;
- unsigned int x, y;
- long width, size, new_width, new_size;
+ int i = 0;
+ unsigned int x = 0;
+ unsigned int y = 0;
+ long width = 0;
+ long size = 0;
+ long new_width = 0;
+ long new_size = 0;
int white, new_white;
int clust_total = argc-1;
FILE **f = NULL;