@@ -1056,7 +1056,7 @@ int32_t IP2Proxy_set_shared_memory(FILE *file)
10561056// Load BIN file into memory
10571057int32_t IP2Proxy_load_database_into_memory (FILE * file , void * memory , int64_t size )
10581058{
1059- fseek (file , SEEK_SET , 0 );
1059+ fseek (file , 0 , SEEK_SET );
10601060
10611061 if (fread (memory , size , 1 , file ) != 1 ) {
10621062 return -1 ;
@@ -1216,7 +1216,7 @@ uint32_t IP2Proxy_read32(FILE *handle, uint32_t position)
12161216
12171217 // Read from file
12181218 if (lookup_mode == IP2PROXY_FILE_IO && handle != NULL ) {
1219- fseek (handle , position - 1 , 0 );
1219+ fseek (handle , position - 1 , SEEK_SET );
12201220 temp = fread (& byte1 , 1 , 1 , handle );
12211221
12221222 if (temp == 0 ) {
@@ -1257,7 +1257,7 @@ uint8_t IP2Proxy_read8(FILE *handle, uint32_t position)
12571257 size_t temp ;
12581258
12591259 if (lookup_mode == IP2PROXY_FILE_IO && handle != NULL ) {
1260- fseek (handle , position - 1 , 0 );
1260+ fseek (handle , position - 1 , SEEK_SET );
12611261 temp = fread (& ret , 1 , 1 , handle );
12621262
12631263 if (temp == 0 ) {
@@ -1315,7 +1315,7 @@ float IP2Proxy_read_float(FILE *handle, uint32_t position)
13151315
13161316 // for SUN SPARC, have to reverse the byte order
13171317 if (lookup_mode == IP2PROXY_FILE_IO && handle != NULL ) {
1318- fseek (handle , position - 1 , 0 );
1318+ fseek (handle , position - 1 , SEEK_SET );
13191319
13201320 temp = fread (p + 3 , 1 , 1 , handle );
13211321
@@ -1348,7 +1348,7 @@ float IP2Proxy_read_float(FILE *handle, uint32_t position)
13481348 }
13491349#else
13501350 if (lookup_mode == IP2PROXY_FILE_IO && handle != NULL ) {
1351- fseek (handle , position - 1 , 0 );
1351+ fseek (handle , position - 1 , SEEK_SET );
13521352 temp = fread (& ret , 4 , 1 , handle );
13531353
13541354 if (temp == 0 ) {
0 commit comments