In general gotos are *REALLY* bad, there must be some better way than
gotos to get this working, maybe it would be a good idea to put some
work into PSEH so that it is suitable for this purpose and save yourself
the trouble of doing it later.
Phillip Susi wrote:
Ok, you have convinced me. Macros are bad. Let's
just stick with the
gotos, i.e.:
Status = NtXXX();
if( !NT_SUCCESS(Status) ) goto somecleanup;
Now if anyone can help me to customize emacs to auto paste the
boilerplate if( !NT_SUCCSS line, maybe even with a DPRINT1 built into
it, I'd appreciate it ;)
Anyhow, from now on I think everyone should try to use the goto method
instead of duplicate cleanup blocks all over the place.
Alex Ionescu wrote:
Phillip Susi wrote:
I've been doing a bit of work on the usetup
code and came to realize
that we have a bit of a widespread problem in a lot of code. There
is a great deal of code that looks basically like this pseudo code:
To everyone suggesting horrendous macro ideas (Filip, wake up!!! You
haven't commented on this yet!), may I recommend the following read:
http://blogs.msdn.com/oldnewthing/archive/2005/01/06/347666.aspx
As well as Larry Osterman's "Hiding Complexity" and "Every programmer
should know what assembly their code generates".
Best regards,
Alex Ionescu
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.com
http://reactos.com:8080/mailman/listinfo/ros-dev