aboutsummaryrefslogtreecommitdiff
path: root/inet/rcmd.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-05-29 17:17:31 +0000
committerUlrich Drepper <drepper@redhat.com>2000-05-29 17:17:31 +0000
commita8322b4fa929e14f7a14e52645232acdaa1d5623 (patch)
tree0c41e5054db88fb39a44ff2ec8d0b1bc847fd55f /inet/rcmd.c
parent08c7f6b0082b1b645348518fdc42643b5580d87c (diff)
downloadglibc-a8322b4fa929e14f7a14e52645232acdaa1d5623.zip
glibc-a8322b4fa929e14f7a14e52645232acdaa1d5623.tar.gz
glibc-a8322b4fa929e14f7a14e52645232acdaa1d5623.tar.bz2
Update.
2000-05-29 Jakub Jelinek <jakub@redhat.com> * inet/rcmd.c (rresvport_af): Use correct port number. 2000-05-26 Andreas Schwab <schwab@suse.de> * Makeconfig ($(common-objpfx)soversions.mk): Prepend `$lib=' to entries in all-sonames. ($(common-objpfx)gnu/lib-names.h): Use it for the CPP symbol, preserving the old name if different for compatibility.
Diffstat (limited to 'inet/rcmd.c')
-rw-r--r--inet/rcmd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/inet/rcmd.c b/inet/rcmd.c
index dd0fd35..12081e8 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -340,11 +340,9 @@ rresvport_af(alport, family)
ss.__ss_family = family;
for (;;) {
- *sport = htons(i);
- if (bind(s, (struct sockaddr *)&ss, len) >= 0){
- *alport = i;
+ *sport = htons((uint16_t) *alport);
+ if (bind(s, (struct sockaddr *)&ss, len) >= 0)
return s;
- }
if (errno != EADDRINUSE) {
(void)__close(s);
return -1;