diff options
author | Harald Welte <laforge@gnumonks.org> | 2014-08-21 02:41:41 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2014-08-21 02:41:41 +0200 |
commit | c9295ea2dd1f52931f8670e706a7b0d4b3ac536b (patch) | |
tree | 301b6fc92518e5eff84ec0b43392fe55f11f36f4 | |
parent | move various generic IPA related functions to libosmocore (diff) | |
download | libosmo-abis-c9295ea2dd1f52931f8670e706a7b0d4b3ac536b.tar.xz libosmo-abis-c9295ea2dd1f52931f8670e706a7b0d4b3ac536b.zip |
fix compiler warning in write_pcap_packet()
if we don't evaluate the result of write(), there's no point in
storing the result in a variable.
-rw-r--r-- | src/e1_input.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/e1_input.c b/src/e1_input.c index 0994910..c454b4a 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -160,7 +160,6 @@ static void write_pcap_packet(int direction, int sapi, int tei, if (pcap_fd < 0) return; - int ret; time_t cur_time; struct tm *tm; @@ -195,10 +194,10 @@ static void write_pcap_packet(int direction, int sapi, int tei, tm = localtime(&cur_time); payload_header.ts_sec = mktime(tm); - ret = write(pcap_fd, &payload_header, sizeof(payload_header)); - ret = write(pcap_fd, &header, sizeof(header)); - ret = write(pcap_fd, &lapd_header, sizeof(lapd_header)); - ret = write(pcap_fd, msg->l2h, msgb_l2len(msg)); + write(pcap_fd, &payload_header, sizeof(payload_header)); + write(pcap_fd, &header, sizeof(header)); + write(pcap_fd, &lapd_header, sizeof(lapd_header)); + write(pcap_fd, msg->l2h, msgb_l2len(msg)); } static const char *sign_types[] = { |