Skip to content

Commit 986d27e

Browse files
committed
dnn: fix failed Torch tests
"Torch invalid argument 2: position must be smaller than LLONG_MAX" These conditions are always true for "long position" argument.
1 parent 93091ba commit 986d27e

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

modules/dnn/src/torch/THDiskFile.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,10 @@ static void THDiskFile_seek(THFile *self, long position)
175175
THArgCheck(dfself->handle != NULL, 1, "attempt to use a closed file");
176176

177177
#if defined(_WIN64)
178-
THArgCheck(position <= (_int64)INT64_MAX, 2, "position must be smaller than INT64_MAX");
179178
if(_fseeki64(dfself->handle, (__int64)position, SEEK_SET) < 0)
180179
#elif defined(_WIN32)
181-
THArgCheck(position <= (long)LONG_MAX, 2, "position must be smaller than LONG_MAX");
182180
if(fseek(dfself->handle, (long)position, SEEK_SET) < 0)
183181
#else
184-
THArgCheck(position <= (long)LLONG_MAX, 2, "position must be smaller than LLONG_MAX");
185182
if(fseeko(dfself->handle, (off_t)position, SEEK_SET) < 0)
186183
#endif
187184
{

0 commit comments

Comments
 (0)