migrate_fd_cleanup will usually close the file descriptor via
buffered_file_close's call to migrate_fd_close. However, in the case
of s->file == NULL it is "inlining" migrate_fd_close (almost: there is a
direct close() instead of using s->close(s)). To fix the inconsistency
and clean up the code,
Il 28/10/2012 10:47, Orit Wasserman ha scritto:
>> > if (s->file) {
>> > DPRINTF("closing file\n");
>> > ret = qemu_fclose(s->file);
>> > -s->file = NULL;
> why remove this line?
Good catch.
Paolo
On 10/18/2012 12:22 PM, Paolo Bonzini wrote:
> migrate_fd_cleanup will usually close the file descriptor via
> buffered_file_close's call to migrate_fd_close. However, in the case
> of s->file == NULL it is "inlining" migrate_fd_close (almost: there is a
> direct close() instead of using s->close(
migrate_fd_cleanup will usually close the file descriptor via
buffered_file_close's call to migrate_fd_close. However, in the case
of s->file == NULL it is "inlining" migrate_fd_close (almost: there is a
direct close() instead of using s->close(s)). To fix the inconsistency
and clean up the code,