| 59 | inline |
| 60 | #endif |
| 61 | void get_next_sector(const alloc_data_t *list_search_space, alloc_data_t **current_search_space, uint64_t *offset, const unsigned int blocksize) |
| 62 | { |
| 63 | #ifdef DEBUG_GET_NEXT_SECTOR |
| 64 | log_debug(" get_next_sector %llu (%llu-%llu)\n", |
| 65 | (unsigned long long)((*offset)/512), |
| 66 | (unsigned long long)((*current_search_space)->start/512), |
| 67 | (unsigned long long)((*current_search_space)->end)/512); |
| 68 | #endif |
| 69 | if((*current_search_space) == list_search_space) |
| 70 | { |
| 71 | return ; |
| 72 | } |
| 73 | #ifdef DEBUG_GET_NEXT_SECTOR |
| 74 | if(! ((*current_search_space)->start <= *offset && (*offset)<=(*current_search_space)->end)) |
| 75 | { |
| 76 | log_critical("BUG: get_next_sector stop everything %llu (%llu-%llu)\n", |
| 77 | (unsigned long long)((*offset)/512), |
| 78 | (unsigned long long)((*current_search_space)->start/512), |
| 79 | (unsigned long long)((*current_search_space)->end/512)); |
| 80 | log_flush(); |
| 81 | log_close(); |
| 82 | exit(1); |
| 83 | } |
| 84 | #endif |
| 85 | if((*offset)+blocksize <= (*current_search_space)->end) |
| 86 | *offset+=blocksize; |
| 87 | else |
| 88 | get_next_header(list_search_space, current_search_space, offset); |
| 89 | } |
| 90 | |
| 91 | /*@ |
| 92 | @ requires \valid_read(list_search_space); |
no test coverage detected