Replace div_up() and round_up() functions with macros.

This commit is contained in:
Vreixo Formoso
2008-01-19 13:45:56 +01:00
parent df5aa263ec
commit 3361e941a6
9 changed files with 37 additions and 47 deletions

View File

@ -176,7 +176,7 @@ int filesrc_writer_compute_data_blocks(IsoImageWriter *writer)
for (i = 0; i < size; ++i) {
IsoFileSrc *file = filelist[i];
file->block = t->curblock;
t->curblock += div_up(iso_file_src_get_size(file), BLOCK_SIZE);
t->curblock += DIV_UP(iso_file_src_get_size(file), BLOCK_SIZE);
}
/* the list is only needed by this writer, store locally */
@ -260,10 +260,10 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
/*
* TODO WARNING
* when we allow files greater than 4GB, current div_up implementation
* when we allow files greater than 4GB, current DIV_UP implementation
* can overflow!!
*/
uint32_t nblocks = div_up(iso_file_src_get_size(file), BLOCK_SIZE);
uint32_t nblocks = DIV_UP(iso_file_src_get_size(file), BLOCK_SIZE);
res = filesrc_open(file);
if (res < 0) {