summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2013-06-15 13:23:54 +0200
committerStefan Bühler <stbuehler@web.de>2013-06-15 13:28:41 +0200
commit1ebdbb88ff1a43afe02628c50603db9476762ffc (patch)
tree24cc1441b3b93c6e7beba1af5a0f81862a128e2e
parentc24b5051c0fd6d215ed9ba385f04aed4d12d8852 (diff)
downloadweighttp-1ebdbb88ff1a43afe02628c50603db9476762ffc.tar.gz
weighttp-1ebdbb88ff1a43afe02628c50603db9476762ffc.zip
Fix bug with unsigned 'char' type (arm) in option parsing (fixes github#6)
-rw-r--r--src/weighttp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/weighttp.c b/src/weighttp.c
index fa6af29..b382f19 100644
--- a/src/weighttp.c
+++ b/src/weighttp.c
@@ -217,7 +217,7 @@ int main(int argc, char *argv[]) {
Worker **workers;
pthread_t *threads;
int i;
- char c;
+ int opt;
int err;
struct ev_loop *loop;
ev_tstamp ts_start, ts_end;
@@ -247,8 +247,8 @@ int main(int argc, char *argv[]) {
config.req_count = 0;
config.keep_alive = 0;
- while ((c = getopt(argc, argv, ":hv6kn:t:c:H:")) != -1) {
- switch (c) {
+ while ((opt = getopt(argc, argv, ":hv6kn:t:c:H:")) != -1) {
+ switch (opt) {
case 'h':
show_help();
return 0;