X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C7FA28.A585BC3D@onstor-exch02.onstor.net>; Tue, 18 Sep 2007 11:18:08 -0800
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-class: urn:content-classes:message
Subject: RE: please review
Date: Tue, 18 Sep 2007 11:18:08 -0800
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E059638C1@onstor-exch02.onstor.net>
In-Reply-To: <20070918121315.0526eb31@ripper.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: please review
Thread-Index: Acf6J/gAY5CGNAcnQwWtvJugjG/nzAAAC1bw
References: <BB375AF679D4A34E9CA8DFA650E2B04E05963779@onstor-exch02.onstor.net> <20070918121315.0526eb31@ripper.onstor.net>
From: "Maxim Kozlovsky" <maxim.kozlovsky@onstor.com>
To: "Andy Sharp" <andy.sharp@onstor.com>



>-----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 =3D 1;

        printf("%d\n", v);

        v =3D 2;
    }
}

