randfile.c: fix a Coverity warning
[openssl.git] / crypto / rand / randfile.c
index 45d20e5c03d715c011d0e8fe902057705b765daa..1b737d1ba2ba3385fbe8aabbeaf032f143ae42d9 100644 (file)
@@ -110,7 +110,7 @@ int RAND_load_file(const char *file, long bytes)
 
     if (bytes < 0) {
         if (S_ISREG(sb.st_mode))
-            bytes = (sb.st_size <= LONG_MAX) ? sb.st_size : LONG_MAX;
+            bytes = sb.st_size;
         else
             bytes = RAND_DRBG_STRENGTH;
     }