OSDN Git Service
(root)
/
uclinux-h8
/
uclibc-ng.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
805d9be
)
Avoid a potentially undefined operation with a veriable++ in a macro
author
Eric Andersen
<andersen@codepoet.org>
Tue, 2 Dec 2003 17:58:24 +0000
(17:58 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Tue, 2 Dec 2003 17:58:24 +0000
(17:58 -0000)
libc/inet/rpc/bindresvport.c
patch
|
blob
|
history
diff --git
a/libc/inet/rpc/bindresvport.c
b/libc/inet/rpc/bindresvport.c
index
7dcebe7
..
579f17b
100644
(file)
--- a/
libc/inet/rpc/bindresvport.c
+++ b/
libc/inet/rpc/bindresvport.c
@@
-76,8
+76,8
@@
bindresvport (int sd, struct sockaddr_in *sin)
for (i = 0; i < NPORTS && res < 0 && errno == EADDRINUSE; ++i)
{
- sin->sin_port = htons (port
++
);
- if (port > ENDPORT)
+ sin->sin_port = htons (port);
+ if (
++
port > ENDPORT)
{
port = STARTPORT;
}