On 24.02.2012 10:58 (UTC+1), Carlos R. Mafra wrote:
On Fri, 24 Feb 2012 at 1:21:58 -0800, Doug Barton wrote:
Use logical negation instead of comparison to 0 for a value that can
be numeric, but is null by default.
This doesn't seem to be right.
'restarting' is not a pointer, it is a 'int'. If checking a int
against zero is not allowed than you'd have many more things to
worry about, no?
So I guess that your patch is not really fixing the issue, even
though it makes things work for you.
Why did you say it is "null" by default? A variable of type
'int' can never be null. I guess it's simply not being set
as it should.
So I'm not applying the patch because I'm not convinced.
I might be mistaken, of course. But right now I don't
think so.
I am afraid your are right. I tried the patch on three boxes running
FreeBSD. On two of them it works and on the third it fails. The third
box is not able to restore any application window.
--- src/startup.c.orig 2012-02-14 11:36:01.000000000 -0800
+++ src/startup.c 2012-02-23 15:50:19.000000000 -0800
@@ -761,7 +761,7 @@
wMenuRestoreState(wScreen[j]);
/* If we're not restarting, restore session */
- if (wPreferences.flags.restarting == 0&&
!wPreferences.flags.norestore)
+ if (!wPreferences.flags.restarting&&
!wPreferences.flags.norestore)
wSessionRestoreState(wScreen[j]);
if (!wPreferences.flags.noautolaunch) {
--
To unsubscribe, send mail to [email protected].