summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Grimm <tobias@e-tobi.loc>2009-04-23 09:21:37 +0200
committerTobias Grimm <tobias@e-tobi.loc>2009-04-23 09:21:37 +0200
commit6a971db6fc1c7aa6eec4f0f852c4209bfd649b82 (patch)
treebc7b4e43d0b7e9c2572c5de8b739a9fe21d2f3e9
parent5c9be00fb7a44861224e80ecf1ed4005236cc7c9 (diff)
downloadvdr-plugin-ttxtsubs-6a971db6fc1c7aa6eec4f0f852c4209bfd649b82.tar.gz
vdr-plugin-ttxtsubs-6a971db6fc1c7aa6eec4f0f852c4209bfd649b82.tar.bz2
Silence compiler warning about unchecked read return value.
Patch provided by Rolf Ahrenberg. Note: I can't reproduce such a compile warning and a failed read should be handled in amore usefule manner.
-rw-r--r--siinfo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/siinfo.c b/siinfo.c
index 6519c59..8bf1a85 100644
--- a/siinfo.c
+++ b/siinfo.c
@@ -292,7 +292,8 @@ static void DiscardBufferedSections(int card_no, uint16_t pid, int table_id)
ret = poll(&pi, 1, 0);
if(ret > 0 && (pi.revents & POLLIN)) {
- read(fd, buf, SECTSIZE);
+ // TODO: Do something more useful if read fails!
+ if(read(fd, buf, SECTSIZE) < 0) { }
n++;
}
} while (ret > 0);