diff options
author | yaworsky <yaworsky> | 2005-10-31 13:20:45 +0000 |
---|---|---|
committer | yaworsky <yaworsky> | 2005-10-31 13:20:45 +0000 |
commit | 10379ee810238a765bf94a4ba48e4fff04fc7b6f (patch) | |
tree | 85efda959420d67a5421ce318f9e566a7fe84ae4 | |
parent | 2f3e30fc859007be7e781c89b59f56a3ce7f3566 (diff) | |
download | syslog-win32-10379ee810238a765bf94a4ba48e4fff04fc7b6f.tar.gz syslog-win32-10379ee810238a765bf94a4ba48e4fff04fc7b6f.tar.xz syslog-win32-10379ee810238a765bf94a4ba48e4fff04fc7b6f.zip |
Clarified loop.
-rw-r--r-- | daemon/dest_file.c | 8 |
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 */ |