mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Remove a useless branch.
longLength <= LONG_MAX is always true if sizeof(long) == sizeof(long long).
This commit is contained in:
parent
e6a69e24bc
commit
eb6d058ab9
@ -56,20 +56,15 @@ MP4::Atom::Atom(File *file)
|
||||
|
||||
if(length == 1) {
|
||||
const long long longLength = file->readBlock(8).toLongLong();
|
||||
if(sizeof(long) == sizeof(long long)) {
|
||||
if(longLength <= LONG_MAX) {
|
||||
// The atom has a 64-bit length, but it's actually a 31-bit value or long is 64-bit.
|
||||
length = static_cast<long>(longLength);
|
||||
}
|
||||
else {
|
||||
if(longLength <= LONG_MAX) {
|
||||
// The atom has a 64-bit length, but it's actually a 31-bit value
|
||||
length = static_cast<long>(longLength);
|
||||
}
|
||||
else {
|
||||
debug("MP4: 64-bit atoms are not supported");
|
||||
length = 0;
|
||||
file->seek(0, File::End);
|
||||
return;
|
||||
}
|
||||
debug("MP4: 64-bit atoms are not supported");
|
||||
length = 0;
|
||||
file->seek(0, File::End);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(length < 8) {
|
||||
|
Loading…
Reference in New Issue
Block a user