aboutsummaryrefslogtreecommitdiff
path: root/src/or/routers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/routers.c')
-rw-r--r--src/or/routers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/routers.c b/src/or/routers.c
index f4d059d9c..e9cee1ef7 100644
--- a/src/or/routers.c
+++ b/src/or/routers.c
@@ -56,7 +56,7 @@ int learn_my_address(struct sockaddr_in *me) {
memset(me,0,sizeof(struct sockaddr_in));
me->sin_family = AF_INET;
memcpy((void *)&me->sin_addr,(void *)localhost->h_addr,sizeof(struct in_addr));
- me->sin_port = htons(options.ORPort);
+ me->sin_port = htons((uint16_t) options.ORPort);
log_fn(LOG_DEBUG,"chose address as '%s'.",inet_ntoa(me->sin_addr));
if (!strncmp("127.",inet_ntoa(me->sin_addr), 4) &&
strcasecmp(localhostname, "localhost")) {