summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/defs.h2
-rw-r--r--src/transport/tcp/tcp.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/defs.h b/src/core/defs.h
index ed2e353f..92ebdb86 100644
--- a/src/core/defs.h
+++ b/src/core/defs.h
@@ -55,7 +55,7 @@ typedef struct {
#define NNI_PUT16(ptr, u) \
do { \
(ptr)[0] = (uint8_t) (((uint16_t) (u)) >> 8); \
- (ptr)[0] = (uint8_t) ((uint16_t) (u)); \
+ (ptr)[1] = (uint8_t) ((uint16_t) (u)); \
} \
while (0)
diff --git a/src/transport/tcp/tcp.c b/src/transport/tcp/tcp.c
index 3fe31f9b..8cd91044 100644
--- a/src/transport/tcp/tcp.c
+++ b/src/transport/tcp/tcp.c
@@ -386,7 +386,7 @@ nni_tcp_ep_bind(void *arg)
}
baddr.s_un.s_in.sa_port = port;
- if ((rv == nni_plat_tcp_listen(&ep->fd, &baddr)) != 0) {
+ if ((rv = nni_plat_tcp_listen(&ep->fd, &baddr)) != 0) {
return (rv);
}
return (0);