| 378 | } |
| 379 | |
| 380 | static fileHandle_t FS_HandleForFile(void) { |
| 381 | int i; |
| 382 | |
| 383 | for ( i = 1 ; i < MAX_FILE_HANDLES ; i++ ) { |
| 384 | if ( fsh[i].handleFiles.file.o == NULL ) { |
| 385 | return i; |
| 386 | } |
| 387 | } |
| 388 | Com_Error( ERR_DROP, "FS_HandleForFile: none free" ); |
| 389 | return 0; |
| 390 | } |
| 391 | |
| 392 | static FILE *FS_FileForHandle( fileHandle_t f ) { |
| 393 | if ( f < 1 || f >= MAX_FILE_HANDLES ) { |
no test coverage detected