comparison keyimport.c @ 256:ac890087b8c1

* keyimport.c: fclose() the key file to make sure data gets written
author Matt Johnston <matt@ucc.asn.au>
date Wed, 30 Nov 2005 06:32:26 +0000
parents c5d3ef11155f
children 740e782679be 454a34b2dfd1
comparison
equal deleted inserted replaced
255:89ace56293f6 256:ac890087b8c1
170 do { 170 do {
171 len = fwrite(buf_getptr(buf, buf->len - buf->pos), 171 len = fwrite(buf_getptr(buf, buf->len - buf->pos),
172 1, buf->len - buf->pos, fp); 172 1, buf->len - buf->pos, fp);
173 buf_incrpos(buf, len); 173 buf_incrpos(buf, len);
174 } while (len > 0 && buf->len != buf->pos); 174 } while (len > 0 && buf->len != buf->pos);
175
176 fclose(fp);
175 177
176 if (buf->pos != buf->len) { 178 if (buf->pos != buf->len) {
177 ret = 0; 179 ret = 0;
178 } else { 180 } else {
179 ret = 1; 181 ret = 1;