aboutsummaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorJoe Damato <ice799@gmail.com>2010-11-08 15:47:34 -0800
committerJoe Damato <ice799@gmail.com>2010-11-28 20:08:01 -0800
commit7b0a7dea2ca8f98bb530e60bf5ffd9d82f445cb5 (patch)
treec51c4c9b4fba47d0d711d3ca3e7c8a07a2b13be8 /options.c
parentafb4434390ffac04fdaa1afcc8c8cda80195994f (diff)
downloadltrace-7b0a7dea2ca8f98bb530e60bf5ffd9d82f445cb5.tar.gz
Keep a count of the number of -x options passed on the command line.
Diffstat (limited to 'options.c')
-rw-r--r--options.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/options.c b/options.c
index 54f7338..d3e62a0 100644
--- a/options.c
+++ b/options.c
@@ -53,6 +53,7 @@ int opt_e_enable = 1;
/* List of global function names given to -x: */
struct opt_x_t *opt_x = NULL;
+unsigned int opt_x_cnt = 0;
/* List of filenames give to option -F: */
struct opt_F_t *opt_F = NULL; /* alternate configuration file(s) */
@@ -409,9 +410,11 @@ process_options(int argc, char **argv) {
perror("ltrace: malloc");
exit(1);
}
+ opt_x_cnt++;
p->name = optarg;
p->found = 0;
p->next = opt_x;
+ p->hash = ~(0UL);
opt_x = p;
break;
}