AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20070918123024.35ec5506@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:onstor-exch02.onstor.net
NSV:
SSH:
R:<maxim.kozlovsky@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@onstor-exch02.onstor.net/INBOX	0	BB375AF679D4A34E9CA8DFA650E2B04E059638C1@onstor-exch02.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Tue, 18 Sep 2007 12:30:36 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: "Maxim Kozlovsky" <maxim.kozlovsky@onstor.com>
Subject: Re: please review
Message-ID: <20070918123036.43610151@ripper.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E059638C1@onstor-exch02.onstor.net>
References: <BB375AF679D4A34E9CA8DFA650E2B04E05963779@onstor-exch02.onstor.net>
	<20070918121315.0526eb31@ripper.onstor.net>
	<BB375AF679D4A34E9CA8DFA650E2B04E059638C1@onstor-exch02.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Tue, 18 Sep 2007 12:18:08 -0700 "Maxim Kozlovsky"
<maxim.kozlovsky@onstor.com> wrote:

> 
> 
> >-----Original Message-----
> >From: Andy Sharp
> >Sent: Tuesday, September 18, 2007 12:13 PM
> >To: Maxim Kozlovsky
> >Subject: Re: please review
> >
> >On Tue, 18 Sep 2007 10:14:39 -0700 "Maxim Kozlovsky"
> ><maxim.kozlovsky@onstor.com> wrote:
> >
> >> Change 25469 by maximk@maximk-5 on 2007/09/18 10:09:29 *pending*
> >>
> >>         20508. reinitialize timeout on every iteration
> >>            reviewed by andys.
> >>
> >> Affected files ...
> >>
> >> ... //depot/dev/nfx-tree/code/samba-3.21a/smbd/server.c#3 edit
> >>
> >
> >nfx-tree/code/samba-3.21a/smbd/server.c
> >
> >     line 353 since you are setting tmo in a declaration, it will
> >     not call that code on every iteration, only the first time in
> >     the block.  which would result in the same as the current code.
> [MK] tmo is going to be reinitialized every time the loop is executed.
> Try this program, it will always print 1.
> 
> #include <stdio.h>
> 
> int
> main()
> {
>     while (1)
>     {
>         int v = 1;
> 
>         printf("%d\n", v);
> 
>         v = 2;
>     }
> }

Hmm, you're right.  But it still seems broken.  For readability I would
still separate the two, but it's up to you.

Cheers,

a
