summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2012-03-02 13:50:29 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2012-03-02 13:50:29 +0000
commitc7540fba9470ec86478fb2709192bb45ac0c93fc (patch)
tree53ad3c83adff4ae3c04818686af49eff4a594568
parent3d9198592bb24b4e109c086dbd079b9575396f58 (diff)
[trunk] Import getopt modification from 1.5 branch
-rw-r--r--applications/common/opj_getopt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/applications/common/opj_getopt.c b/applications/common/opj_getopt.c
index f6e6500a..252d8359 100644
--- a/applications/common/opj_getopt.c
+++ b/applications/common/opj_getopt.c
@@ -65,7 +65,7 @@ void reset_options_reading(void) {
int opj_getopt(int nargc, char *const *nargv, const char *ostr) {
# define __progname nargv[0]
static char *place = EMSG; /* option letter processing */
- char *oli; /* option letter list index */
+ char *oli = NULL; /* option letter list index */
if (opj_optreset || !*place) { /* update scanning pointer */
opj_optreset = 0;
@@ -197,7 +197,7 @@ again:
return o->val;
return 0;
}
- }//(end for)String not found in the list
+ }/*(end for)String not found in the list*/
fprintf(stderr,"Invalid option %s\n",arg);
++opj_optind;
return (BADCH);
@@ -244,11 +244,11 @@ found:
fprintf(stderr,"Invalid option %s\n",arg);
++opj_optind;
return (BADCH);
- }//end of not found
+ }/*end of not found*/
- }// end of single character
- }//end '-'
+ }/* end of single character*/
+ }/*end '-'*/
fprintf(stderr,"Invalid option\n");
++opj_optind;
return (BADCH);;
-}//end function
+}/*end function*/