--- psiconv/trunk/lib/psiconv/data.c 2001/07/01 12:01:59 120 +++ psiconv/trunk/lib/psiconv/data.c 2001/07/01 13:14:19 121 @@ -563,22 +563,22 @@ psiconv_free_sheet_numberformat(layout->numberformat); } -void psiconv_free_sheet_cell(psiconv_sheet_cell cell) +void psiconv_free_sheet_cell_aux(void *cell) { - if (cell) { - psiconv_free_sheet_cell_layout(cell->layout); + psiconv_sheet_cell data = cell; - if ((cell->type == psiconv_cell_string) && (cell->data.dat_string)) - free(cell->data.dat_string); - free(cell); - } + psiconv_free_sheet_cell_layout(data->layout); + + if ((data->type == psiconv_cell_string) && (data->data.dat_string)) + free(data->data.dat_string); } -void psiconv_free_sheet_cell_aux(void *data) +void psiconv_free_sheet_cell(psiconv_sheet_cell cell) { - psiconv_sheet_cell cell; - cell = data; - psiconv_free_sheet_cell(cell); + if (cell) { + psiconv_free_sheet_cell_aux(cell); + free(cell); + } } void psiconv_free_sheet_cell_list(psiconv_sheet_cell_list list) @@ -645,7 +645,7 @@ { if (section) { psiconv_free_formula_list(section->formulas); - psiconv_free_sheet_worksheet_list(section->worksheets); + psiconv_free_sheet_worksheet_list(section->worksheets); free(section); } }