Le jeu 14/08/2003 à 15:36, Dustin Navea a écrit :
--- Vincent Béron vberon@mecano.gme.usherb.ca wrote:
@@ -153,6 +153,9 @@ } }
- if (*s && action == ACTION_UNDEF)
action = ACTION_ADD;
- if (action == ACTION_UNDEF) return FALSE;
<IMHO> I think this would be a little cleaner (or at least easier to read):
if (*s && action == ACTION_UNDEF) action = ACTION_ADD; else if (action == ACTION_UNDEF) return FALSE;
Sure, I agree with that. I was a bit in a hurry yesterday, when I noticed while building RH8 and RH9 RPMs that I had a regedit window (when the import was supposed to stay windowless) and that the file hadn't be imported. My first goal was to get it to work correctly.
that or
if (action == ACTION_UNDEF) { if (*s) action = ACTION_ADD; return FALSE; }
This won't do the same thing (the return statement will always be executed).
Vincent
--- Vincent B�ron vberon@mecano.gme.usherb.ca wrote:
Le jeu 14/08/2003 à 15:36, Dustin Navea a écrit :
if (action == ACTION_UNDEF) { if (*s) action = ACTION_ADD; return FALSE; }
This won't do the same thing (the return statement will always be executed).
oops mis-read the code lol.. action = ACTION_ADD if *s is not null or false and so the return is not executed (good). In my code, the return is executed regardless of action's value (bad).. but the first way i wrote (adding the else) is better because you only check the value of action twice if *s is null or false (!*s) (less processing if (*s)) heh confused yet?
===== -- Dustin Navea
Minor Contributor, http://www.winehq.com Bugzilla Janitor, http://bugs.winehq.com Network Admin, irc://irc.blynk.net (down)
__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com