> > src/arch/x86/vtophys.cc<http://reviews.m5sim.org/r/385/diff/1/?file=9054#file9054line70> > (Diff > revision 1) > > 70 > > Fault fault = walker->startFunctional(tc, NULL, req, mode); > > Having a temporary variable here seems unnecessary unless it's to prevent > having to wrap the next line. It's not a big deal, though. > > On January 7th, 2011, 5:07 p.m., *Joel Hestness* wrote: > > As far as I can tell, convention in ALL other code is to store the fault as a > temporary variable, even if it could simply be pushed into the if-clause. > > I'd call that coincidence and not convention, and definitely not enough to > justify doing it here. Then again, you don't really need to justify it > because it's not really wrong. > > FWIW, I think temporary variables are a fantastic way to make code more readable. It is much harder for a temporary to get out of date (compared to a comment), and they can be used to break down a complex expression into more manageable chunks.
Nate
_______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev