projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
reset optind opterr inside the function calls ...
[rrdtool.git]
/
src
/
rrd_first.c
diff --git
a/src/rrd_first.c
b/src/rrd_first.c
index
ab3bd49
..
eee8140
100644
(file)
--- a/
src/rrd_first.c
+++ b/
src/rrd_first.c
@@
-14,6
+14,7
@@
rrd_first(int argc, char **argv)
{
int target_rraindex=0;
char *endptr;
{
int target_rraindex=0;
char *endptr;
+ optind = 0; opterr = 0; /* initialize getopt */
while (1){
static struct option long_options[] =
while (1){
static struct option long_options[] =
@@
-23,6
+24,7
@@
rrd_first(int argc, char **argv)
};
int option_index = 0;
int opt;
};
int option_index = 0;
int opt;
+ optind = 0; opterr = 0; /* initialize getopt */
opt = getopt_long(argc, argv, "", long_options, &option_index);
if(opt == EOF)
opt = getopt_long(argc, argv, "", long_options, &option_index);
if(opt == EOF)