about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-01-09 17:02:21 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-01-09 17:02:21 +0000
commit606f4c5894298639410a5fc64f50d4f26cf548c0 (patch)
tree9d0d449fb4825f25e8d2ed6937bf7b3d1d3e9bd8
parent20acc98dd40630e544c8fb783a3a304d84ed1efc (diff)
downloadnetpbm-mirror-606f4c5894298639410a5fc64f50d4f26cf548c0.tar.gz
netpbm-mirror-606f4c5894298639410a5fc64f50d4f26cf548c0.tar.xz
netpbm-mirror-606f4c5894298639410a5fc64f50d4f26cf548c0.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@199 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--editor/pamflip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/pamflip.c b/editor/pamflip.c
index 59b60b56..0c2aabb4 100644
--- a/editor/pamflip.c
+++ b/editor/pamflip.c
@@ -171,7 +171,7 @@ parseCommandLine(int argc, char ** const argv,
    Note that the file spec array we return is stored in the storage that
    was passed to us as the argv array.
 -----------------------------------------------------------------------------*/
-    optEntry *option_def = malloc(100*sizeof(optEntry));
+    optEntry * option_def;
         /* Instructions to OptParseOptions3 on how to parse our options.
          */
     optStruct3 opt;
@@ -183,6 +183,8 @@ parseCommandLine(int argc, char ** const argv,
     unsigned int memsizeOpt;
     const char *xformOpt;
 
+    MALLOCARRAY(option_def, 100);
+
     option_def_index = 0;   /* incremented by OPTENTRY */
     OPTENT3(0, "lr",        OPT_FLAG,    NULL, &lr,      0);
     OPTENT3(0, "leftright", OPT_FLAG,    NULL, &lr,      0);
@@ -860,7 +862,7 @@ main(int argc, char * argv[]) {
     struct cmdlineInfo cmdline;
     struct pam inpam;
     struct pam outpam;
-    FILE* ifP;
+    FILE * ifP;
     struct xformMatrix xform;
 
     pnm_init(&argc, argv);