replace atol with atoll to fix result size display bug. Also use atoll for time conversions, 2032 is coming...
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user