diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-05-09 00:28:01 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2019-05-09 23:53:12 +0000 |
commit | 2d05901cd4286156de14356e27afb213cb0ec711 (patch) | |
tree | de16ca0d0eeaedbff87ccf91408b063106b9a37c | |
parent | 1f07f3e34a5683ec297eb886ee445e050181dbce (diff) |
trxcon/trx_if.c: use read() call instead of recv()
According to the man page of recv(), the only difference of this
call from read() is the presence of flags. With a zero flags
argument, recv() is generally equivalent to read().
Change-Id: I6d43bbf8d52c5fbb8ee0592b7d1c1dfd2dd1548e
-rw-r--r-- | src/host/trxcon/trx_if.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index 4c10da6c..91075f44 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -443,7 +443,7 @@ static int trx_ctrl_read_cb(struct osmo_fd *ofd, unsigned int what) int len, resp, rsp_len; char buf[1500], *p; - len = recv(ofd->fd, buf, sizeof(buf) - 1, 0); + len = read(ofd->fd, buf, sizeof(buf) - 1); if (len <= 0) return len; buf[len] = '\0'; @@ -550,7 +550,7 @@ static int trx_data_rx_cb(struct osmo_fd *ofd, unsigned int what) uint32_t fn; int len; - len = recv(ofd->fd, buf, sizeof(buf), 0); + len = read(ofd->fd, buf, sizeof(buf)); if (len <= 0) return len; |