]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1960] Compare streampos values instead streampos to int.
authorMarcin Siodelski <marcin@isc.org>
Tue, 25 Sep 2012 19:55:54 +0000 (21:55 +0200)
committerMarcin Siodelski <marcin@isc.org>
Tue, 25 Sep 2012 19:55:54 +0000 (21:55 +0200)
tests/tools/perfdhcp/test_control.cc

index 39c4d18210a6c6a8e029ffebe9e56d543925e796..b7c3cd657c207fe721044e4de6e0607634c9e165 100644 (file)
@@ -885,8 +885,8 @@ TestControl::readPacketTemplate(const std::string& file_name) {
         isc_throw(BadValue, "unable to open template file " << file_name);
     }
     // Read template file contents.
-    std::ifstream::pos_type temp_size = temp_file.tellg();
-    if (temp_size == 0) {
+    std::streampos temp_size = temp_file.tellg();
+    if (temp_size == std::streampos(0)) {
         temp_file.close();
         isc_throw(OutOfRange, "the template file " << file_name << " is empty");
     }