From 2d05901cd4286156de14356e27afb213cb0ec711 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Thu, 9 May 2019 00:28:01 +0700 Subject: 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 --- src/host/trxcon/trx_if.c | 4 ++-- 1 file 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; -- cgit v1.2.3