aboutsummaryrefslogtreecommitdiffstats
path: root/daemon/dest_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/dest_file.c')
-rw-r--r--daemon/dest_file.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/daemon/dest_file.c b/daemon/dest_file.c
index cbf1cc1..a1e917b 100644
--- a/daemon/dest_file.c
+++ b/daemon/dest_file.c
@@ -452,11 +452,15 @@ static void put_message_to_file_dest( struct destination* destination, struct me
EnterCriticalSection( &extra->cs_file_writers );
/* find existing writer */
for( writer = NULL, item = extra->file_writers; item; item = item->next )
- if( strcmp( ((struct file_writer*) (item->data))->file_name, file_name ) == 0 )
+ {
+ struct file_writer *w = item->data;
+
+ if( strcmp( w->file_name, file_name ) == 0 )
{
- writer = item->data;
+ writer = w;
break;
}
+ }
if( !writer )
{
/* create new writer */