lkml.org 
[lkml]   [2012]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V2 18/18] Tools: hv: Properly manage open streams
From
Date
On Mon, 2012-08-13 at 10:07 -0700, K. Y. Srinivasan wrote:
> Close the open streams properly.
>
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
> Reviewed-by: Olaf Hering <olaf@aepfle.de>
> Reviewed-by: Ben Hutchings <ben@decadent.org.uk>

This isn't reviewed by me, I'm the author!

Ben.

> ---
> tools/hv/hv_kvp_daemon.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
> index c8e1013..ca6424f 100644
> --- a/tools/hv/hv_kvp_daemon.c
> +++ b/tools/hv/hv_kvp_daemon.c
> @@ -160,7 +160,7 @@ static void kvp_update_file(int pool)
> sizeof(struct kvp_record),
> kvp_file_info[pool].num_records, filep);
>
> - fflush(filep);
> + fclose(filep);
> kvp_release_lock(pool);
> }
>
> @@ -206,7 +206,7 @@ static void kvp_update_mem_state(int pool)
> kvp_file_info[pool].num_blocks = num_blocks;
> kvp_file_info[pool].records = record;
> kvp_file_info[pool].num_records = records_read;
> -
> + fclose(filep);
> kvp_release_lock(pool);
> }
> static int kvp_file_init(void)

--
Ben Hutchings
I say we take off; nuke the site from orbit. It's the only way to be sure.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-08-14 04:42    [W:0.108 / U:1.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site