about summary refs log tree commit diff
path: root/analyzer
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-12-04 17:05:56 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-12-04 17:05:56 +0000
commit6c91abbb532afb5186ab2307fb1ef0033f58b1f1 (patch)
treeb796d32c36ca563ce7ff6c9125c10c922c67250c /analyzer
parente7699067fce588bb8ac3172f19783db2b3b87990 (diff)
downloadnetpbm-mirror-6c91abbb532afb5186ab2307fb1ef0033f58b1f1.tar.gz
netpbm-mirror-6c91abbb532afb5186ab2307fb1ef0033f58b1f1.tar.xz
netpbm-mirror-6c91abbb532afb5186ab2307fb1ef0033f58b1f1.zip
Release 10.47.42
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@1799 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'analyzer')
-rw-r--r--analyzer/pgmhist.c6
-rw-r--r--analyzer/pnmpsnr.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/analyzer/pgmhist.c b/analyzer/pgmhist.c
index ede41e0d..4790ecba 100644
--- a/analyzer/pgmhist.c
+++ b/analyzer/pgmhist.c
@@ -40,9 +40,11 @@ parseCommandLine(int argc, const char ** argv,
     optEntry * option_def;
     unsigned int option_def_index;
     
-    MALLOCARRAY(option_def, 100);
+    MALLOCARRAY_NOFAIL(option_def, 100);
 
-    option_def_index = 0;   /* incremented by OPTENTRY */
+    option_def_index = 0;   /* incremented by OPTENT3 */
+
+    OPTENTINIT;
 
     opt.opt_table = option_def;
     opt.short_allowed = FALSE;  /* We have no short (old-fashioned) options */
diff --git a/analyzer/pnmpsnr.c b/analyzer/pnmpsnr.c
index c32f7d64..1160fff6 100644
--- a/analyzer/pnmpsnr.c
+++ b/analyzer/pnmpsnr.c
@@ -150,7 +150,7 @@ main (int argc, char **argv) {
     
     pnm_init(&argc, argv);
 
-    if (argc < 2) 
+    if (argc-1 < 2) 
         pm_error("Takes two arguments:  specifications of the two files.");
     else {
         filespec1 = argv[1];