[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] new ssh branch, success!
From: |
Nathan Myers |
Subject: |
Re: [Monotone-devel] new ssh branch, success! |
Date: |
Sat, 20 Nov 2004 08:38:43 -0800 |
User-agent: |
Mutt/1.3.28i |
On Sat, Nov 20, 2004 at 05:20:13PM +0100, Christof Petig wrote:
> Christof Petig schrieb:
> >Nathaniel Smith schrieb:
> >>In netsync.cc:
> >>- virtual ~session() {}
> >>+ virtual ~session() {} // if (str_p) delete str_p; }
Surely everybody here is aware that "if (p) delete p" is equivalent
to "delete p"? In practice, it means str_p is compared to zero
twice. I'm reminded of student assignments in which a variable is
assigned to twice, "in case the first one didn't take".
I haven't looked up the type of str_p, but if it's a character
array, the correct statement is "delete [] str_p".
Nathan Myers
address@hidden
- [Monotone-devel] new ssh branch, success!, Christof Petig, 2004/11/17
- Re: [Monotone-devel] new ssh branch, success!, Nathaniel Smith, 2004/11/20
- Re: [Monotone-devel] new ssh branch, success!, Christof Petig, 2004/11/20
- Re: [Monotone-devel] new ssh branch, success!, Christof Petig, 2004/11/20
- Re: [Monotone-devel] new ssh branch, success!,
Nathan Myers <=
- [Monotone-devel] Re: new ssh branch, success!, Bruce Stephens, 2004/11/20
- Re: [Monotone-devel] new ssh branch, success!, Nathaniel Smith, 2004/11/20
- Re: [Monotone-devel] new ssh branch, success!, Nathaniel Smith, 2004/11/20