[Coverity] Unchecked return value from library (CHECKED_RETURN)
authorPeter D. Barnes, Jr. <barnes26@llnl.gov>
Thu, 16 May 2013 11:18:20 -0400
changeset 9792 0ae0a3d90b3c
parent 9791 47c3efe53b24
child 9793 bd8de25954e4
[Coverity] Unchecked return value from library (CHECKED_RETURN)
src/network/test/pcap-file-test-suite.cc
--- a/src/network/test/pcap-file-test-suite.cc	Thu May 16 11:06:52 2013 -0400
+++ b/src/network/test/pcap-file-test-suite.cc	Thu May 16 11:18:20 2013 -0400
@@ -894,7 +894,8 @@
   // starting there in the file.  We've tested this all before so we just assume
   // it's all right and just seek past it.
   //
-  std::fseek (p, 24, SEEK_SET);
+  result = std::fseek (p, 24, SEEK_SET);
+  NS_TEST_ASSERT_MSG_EQ (result, 0, "Failed seeking past pcap header");
 
   result = std::fread (&val32, sizeof(val32), 1, p);
   NS_TEST_ASSERT_MSG_EQ (result, 1, "Unable to fread() seconds timestamp");