diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-10-14 04:06:24 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-10-14 04:06:24 +0000 |
commit | 08c33f0b4664b699593057f02d7f98108157aacc (patch) | |
tree | b921117ebf5edc7f1cb26b87ec88067910ae8d71 | |
parent | bd10bf4b5bbe022f85bbf8d56e6afa50ad76bf60 (diff) | |
download | tor-08c33f0b4664b699593057f02d7f98108157aacc.tar.gz tor-08c33f0b4664b699593057f02d7f98108157aacc.zip |
Compile without warnings on windows
svn:r2491
-rw-r--r-- | src/or/router.c | 2 | ||||
-rw-r--r-- | src/or/routerparse.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/or/router.c b/src/or/router.c index 5374631072..df0f428977 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -349,7 +349,7 @@ int init_keys(void) { /* 6b. [authdirserver only] add own key to approved directories. */ crypto_pk_get_digest(get_identity_key(), digest); if (!router_digest_is_trusted_dir(digest)) { - add_trusted_dir_server(options.Address, options.DirPort, digest); + add_trusted_dir_server(options.Address, (uint16_t)options.DirPort, digest); } /* 7. [authdirserver only] load old directory, if it's there */ sprintf(keydir,"%s/cached-directory", datadir); diff --git a/src/or/routerparse.c b/src/or/routerparse.c index b58950a68f..4e96d28da0 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -799,9 +799,9 @@ routerinfo_t *router_parse_entry_from_string(const char *s, log_fn(LOG_WARN,"Wrong # of arguments to \"ports\""); goto err; } - router->or_port = tor_parse_long(tok->args[0],10,0,65535,NULL,NULL); - router->socks_port = tor_parse_long(tok->args[1],10,0,65535,NULL,NULL); - router->dir_port = tor_parse_long(tok->args[2],10,0,65535,NULL,NULL); + router->or_port = (uint16_t) tor_parse_long(tok->args[0],10,0,65535,NULL,NULL); + router->socks_port = (uint16_t) tor_parse_long(tok->args[1],10,0,65535,NULL,NULL); + router->dir_port = (uint16_t) tor_parse_long(tok->args[2],10,0,65535,NULL,NULL); ports_set = 1; } @@ -813,7 +813,7 @@ routerinfo_t *router_parse_entry_from_string(const char *s, log_fn(LOG_WARN,"Wrong # of arguments to \"dircacheport\""); goto err; } - router->dir_port = tor_parse_long(tok->args[0],10,1,65535,NULL,NULL); + router->dir_port = (uint16_t) tor_parse_long(tok->args[0],10,1,65535,NULL,NULL); } tok = find_first_by_keyword(tokens, K_BANDWIDTH); |