summaryrefslogtreecommitdiff
path: root/src/asn1Parser.c
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-05-20 10:44:52 +0200
committerSimon Josefsson <simon@josefsson.org>2009-05-20 10:44:52 +0200
commit2f1b3d3bc5bf1164dae04b450ab99997d4ed3cc6 (patch)
treef7a398e3b27e3175991f387ce08b8eb296e48db4 /src/asn1Parser.c
parent231d76e24fa5cc0f84e71f642573b50e99887f4f (diff)
downloadlibtasn1-2f1b3d3bc5bf1164dae04b450ab99997d4ed3cc6.tar.gz
libtasn1-2f1b3d3bc5bf1164dae04b450ab99997d4ed3cc6.tar.bz2
libtasn1-2f1b3d3bc5bf1164dae04b450ab99997d4ed3cc6.zip
Fix syntax-check problems.
Diffstat (limited to 'src/asn1Parser.c')
-rw-r--r--src/asn1Parser.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/src/asn1Parser.c b/src/asn1Parser.c
index 7e4d18e..8a09209 100644
--- a/src/asn1Parser.c
+++ b/src/asn1Parser.c
@@ -59,7 +59,7 @@ static const char help_man[] =
int
main (int argc, char *argv[])
{
- static struct option long_options[] = {
+ static const struct option long_options[] = {
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'v'},
{"check", no_argument, 0, 'c'},
@@ -101,19 +101,15 @@ main (int argc, char *argv[])
case 'h': /* HELP */
printf ("%s\n", help_man);
- if (outputFileName)
- free (outputFileName);
- if (vectorName)
- free (vectorName);
+ free (outputFileName);
+ free (vectorName);
exit (0);
break;
case 'v': /* VERSION */
version_etc (stdout, program_name, PACKAGE, VERSION,
"Fabio Fiorina", NULL);
- if (outputFileName)
- free (outputFileName);
- if (vectorName)
- free (vectorName);
+ free (outputFileName);
+ free (vectorName);
exit (0);
break;
case 'c': /* CHECK SYNTAX */
@@ -133,10 +129,8 @@ main (int argc, char *argv[])
argv[optind - 1]);
printf ("%s\n", help_man);
- if (outputFileName)
- free (outputFileName);
- if (vectorName)
- free (vectorName);
+ free (outputFileName);
+ free (vectorName);
exit (1);
break;
default:
@@ -152,10 +146,8 @@ main (int argc, char *argv[])
fprintf (stderr, "asn1Parser: input file name missing.\n\n");
printf ("%s\n", help_man);
- if (outputFileName)
- free (outputFileName);
- if (vectorName)
- free (vectorName);
+ free (outputFileName);
+ free (vectorName);
exit (1);
}
else
@@ -194,10 +186,8 @@ main (int argc, char *argv[])
free (inputFileName);
- if (outputFileName)
- free (outputFileName);
- if (vectorName)
- free (vectorName);
+ free (outputFileName);
+ free (vectorName);
if (parse_result != ASN1_SUCCESS)
exit (1);