--- psiconv/trunk/lib/psiconv/generate_driver.c 2000/12/24 16:03:57 73 +++ psiconv/trunk/lib/psiconv/generate_driver.c 2000/12/24 17:26:24 75 @@ -28,18 +28,14 @@ int psiconv_write(psiconv_buffer *buf,const psiconv_file value) { - int allocated = 0; int res; if (!value) { psiconv_warn(0,0,"Can't parse to an empty buffer!"); return -PSICONV_E_OTHER; } - if (!*buf) { - if (!(*buf = psiconv_new_buffer())) - return -PSICONV_E_NOMEM; - allocated = 1; - } + if (!(*buf = psiconv_new_buffer())) + return -PSICONV_E_NOMEM; #if 0 if (value->type == psiconv_word_file) { @@ -73,8 +69,7 @@ return -PSICONV_E_OK; ERROR: - if (allocated) - psiconv_free_buffer(*buf); + psiconv_free_buffer(*buf); return res; }