replace atol with atoll to fix result size display bug. Also use atoll for time conversions, 2032 is coming...

This commit is contained in:
"Jean-Francois Dockes ext:(%22)
2013-04-04 20:01:31 +02:00
parent 98528d3203
commit 321978bfea
7 changed files with 16 additions and 16 deletions
+4 -4
View File
@@ -367,22 +367,22 @@ public:
m_reason << "readfirstblock: conf get maxsize failed";
return false;
}
m_maxsize = atol(value.c_str());
m_maxsize = atoll(value.c_str());
if (!conf.get("oheadoffs", value, cstr_null)) {
m_reason << "readfirstblock: conf get oheadoffs failed";
return false;
}
m_oheadoffs = atol(value.c_str());
m_oheadoffs = atoll(value.c_str());
if (!conf.get("nheadoffs", value, cstr_null)) {
m_reason << "readfirstblock: conf get nheadoffs failed";
return false;
}
m_nheadoffs = atol(value.c_str());
m_nheadoffs = atoll(value.c_str());
if (!conf.get("npadsize", value, cstr_null)) {
m_reason << "readfirstblock: conf get npadsize failed";
return false;
}
m_npadsize = atol(value.c_str());
m_npadsize = atoll(value.c_str());
if (!conf.get("unient", value, cstr_null)) {
m_uniquentries = false;
} else {
+2 -2
View File
@@ -234,10 +234,10 @@ int main(int argc, const char **argv)
while (**argv)
switch (*(*argv)++) {
case 'c': op_flags |= OPT_c; if (argc < 2) Usage();
cnt = atol(*(++argv)); argc--;
cnt = atoll(*(++argv)); argc--;
goto b1;
case 'o': op_flags |= OPT_o; if (argc < 2) Usage();
offs = strtoul(*(++argv), 0, 0); argc--;
offs = strtoull(*(++argv), 0, 0); argc--;
goto b1;
default: Usage(); break;
}