消息 [94434]
I'm not comfortable with the following change (which appears twice in
the patch):
- BZ2_bzReadClose(&bzerror, self->fp);
+ if (self->fp)
+ BZ2_bzReadClose(&bzerror, self->fp);
break;
case MODE_WRITE:
- BZ2_bzWriteClose(&bzerror, self->fp,
- 0, NULL, NULL);
+ if (self->fp)
+ BZ2_bzWriteClose(&bzerror, self->fp,
+ 0, NULL, NULL);
If you need to test for the file pointer, perhaps there's a logic flaw
in your patch. Also, it might be dangerous in write mode: could it occur
that the file isn't closed but the problem isn't reported? |
|
| 日期 |
用户 |
动作 |
参数 |
| 2009-10-24 18:44:20 | pitrou | 修改 | recipients:
+ pitrou, akuchling, niemeyer, therve, thomaslee, r.david.murray, dbonner |
| 2009-10-24 18:44:20 | pitrou | 修改 | messageid: <1256409860.53.0.080081439536.issue1625@psf.upfronthosting.co.za> |
| 2009-10-24 18:44:19 | pitrou | 链接 | issue1625 messages |
| 2009-10-24 18:44:19 | pitrou | 创建 | |
|